Required | required
data-parsley-required
data-parsley-required="true"
data-parsley-required="false" | Validates that a required field has been filled with a non blank value. If data-parsley-required="false" , validator is deactivated and the field is not required. |
Email | type="email"
data-parsley-type="email" | Validates that a value is a valid email address. |
Number | data-parsley-type="number" | Validates that a value is a valid number according to the given step , min and original value . The default step for HTML5 is “1”, which is so counterintuive that Parsley uses a default step of “any” for data-parsley-type="number" . |
Integer | type="number"
data-parsley-type="integer" | Validates that a value is a valid integer. |
Digits | data-parsley-type="digits" | Validates that a value is only digits. |
Alphanum | data-parsley-type="alphanum" | Validates that a value is a valid alphanumeric string. |
Url | type="url"
data-parsley-type="url" | Validates that a value is a valid url. |
Minlength | minlength="6"
data-parsley-minlength="6" | Validates that the length of a string is at least as long as the given limit. |
Maxlength | maxlength="10"
data-parsley-maxlength="10" | Validates that the length of a string is not longer than the given limit. |
Length | data-parsley-length="[6, 10]" | Validates that a given string length is between some minimum and maximum value. |
Min | min="6"
data-parsley-min="6" | Validates that a given input (number or date) or date is greater than or equal to some minimum (number or date.) |
Max | max="10"
data-parsley-max="10" | Validates that the given input (number or date) is less than or equal to some maximum value (number or date). |
Range | type="range"
data-parsley-range="[6, 10]" | Validates that a given value (number or date) is between some minimum and maximum values (numbers or dates). |
Pattern | pattern="\d+"
data-parsley-pattern="\d+" | Validates that a value matches a specific regular expression (regex). |
MinCheck | data-parsley-mincheck="3" | Validates that a certain minimum number of checkboxes in a group are checked. |
MaxCheck | data-parsley-maxcheck="3" | Validates that a certain maximum number of checkboxes in a group are checked. |
Check | data-parsley-check="[1, 3]" | Validates that the number of checked checkboxes in a group is within a certain range. |
Equalto | data-parsley-equalto="#anotherfield" | Validates that the value is identical to another field’s value (useful for password confirmation check). |