422 Unprocessable Entity and nothing is saved.
Configure rules in the dashboard on each field under Validations.
Core rules
Rules by type
- Text
- Number
- Password
- Date & time
- Select & lists
Formats:
email, url, uuid, ip / ipv4, ipv6, phone (optional + and 7–15 digits), slug (lowercase letters, digits, and hyphens).Cross-field rules
Unique together
A trip code may repeat from one year to the next, but only once per year. Put the rule on the trip code field and list the other fields by id:Conditional rules
Apply rules only in some situations. A condition compares another field to a value:Error response
Field 'title' is required.Field 'email' must be unique.Field 'code' does not match the required pattern.Field 'amount' has an invalid value for type 'number'.
Custom messages
You can replace the message of any rule on a field. In the field’s settings, open Custom error messages under a rule section, or fill in the message under Required or Unique. In the schema they live invalidations.messages, keyed by rule:
{field} is replaced by the field’s label and {value} by the submitted value. Rules without a custom message keep the default.
See Errors for the full error format.
