Validation
You can apply a set of custom validations against any of the form fields that accept input.
You can apply a set of custom validations against any of the form fields that accept input. The validation rules are provided by VeeValidate and there are a large set of available validations that can be chained together. To chain validations together separate them with a pipe sign |
VeeValidate
VeeValidate is used for validations. You have a wealth of configurable validations that can be chained together. A full listing of validations can be found here
.
Example Rules
Rule | Description |
| |
| Required and the field under validation must have a numeric value bounded by a minimum value and a maximum value. |
| The field under validation must be numeric and have the specified number of digits. |
| The field under validation must be a valid email. |
| The field under validation must have a value that is in the specified list. Uses double equals for checks. |
| The field under validation must be equal to the first argument passed, uses |
| The field under validation length may not exceed the specified length. |
| The field under validation must be a numeric value and must not be greater than the specified value. |
| The field under validation length should not be less than the specified length. |
| The field under validation must be a numeric value and must not be less than the specified value. |
| The field under validation must only consist of numbers. |
| The field under validation must match the specified regular expression. |
| The field under validation must have a non-empty value. By default, all validators pass the validation if they have "empty values" unless they are required. Those empty values are: empty strings, undefined, null, empty arrays. |
| The field under validation must have a non-empty value only if the target field (first argument) is set to one of the specified values (other arguments). |
Last updated