Validator
Thevalidator module creates small schema objects that expose parse(data). A successful parse returns true. A failed parse raises Validation Error: ..., so wrap user-controlled inputs with pcall when you want to handle errors without stopping execution.
Basic schema
Rules
Marks a value as required. When
message is provided, that message overrides the default missing-field error.Sets a custom error message for the rule. The message is used when type or custom checks fail.
