Interactive examples for every built-in validation rule.
Sign-up form covering required, email, minlength, and equalTo.
Validates that the value contains only alphabetic letters (a–z, A–Z). Digits, spaces, and special characters are rejected.
RuleEnsures a field has a non-empty value after trimming whitespace.
RuleValidates that the value is a properly formatted email address.
RuleValidates that the value is a properly formatted URL.
RuleValidates that the value can be parsed as a valid date.
RuleValidates ISO-like date format: YYYY-MM-DD or YYYY/MM/DD.
Validates time in H:MM, HH:MM, or HH:MM:SS format.
Constrains the number of characters allowed in a field.
RuleValidates a field against a regular expression.
RuleConfirms two fields have the same value (e.g. password confirmation).
Rule · v1.3.0Requires one field to differ from another, such as a new password versus the current password.
RuleAccepts only numeric digit characters (0–9).
RuleValidates that a numeric value falls between a minimum and maximum using range: [min, max].
Validates that the value is a properly formatted IPv4 address (e.g. 192.168.1.1).
Validates that the value is a properly formatted IPv6 address (e.g. 2001:db8::1).
Accepts only letters, digits, and underscores — no spaces or special characters.
RuleValidates that the value is a valid CSS hex color — 3-digit (e.g. #fff) or 6-digit (e.g. #ffffff).
Limits the number of selected files and enforces a per-file size cap for uploads.
AdvancedExtend the validator with your own rules using addMethod().
Switch between built-in locales (en, es) and register custom ones at runtime with addLocaleMessages().
Declare rules directly in HTML using data-rule-* and data-msg-* attributes.