{{#> form-validations/layout/default package="Form Validations" title="Form Validations" }}

## Real-World examples

Username
ZIP code
Your age (min. 14)
Password
Retype password
Email
Phone
I accept the terms and conditions (required)

## Common Validations

Required TextField
TextField `type="email"`, not required
TextField `minlength="2"`
TextField `type="number"`, not required
TextField `type="number"`, `min="100"`, not required
TextField `type="number"`, `min="100"`, required
TextField with `pattern="/^\d+\.\d{2}$/"` (match decimal with 2 points), required
TextField with same as above field, but with custom message

## Custom global validator

Required TextField, Range 10 - 30

## Custom validator to a specific field

Required TextField, First Letter Capitalized

## Custom error messages

Required TextField
Required TextField, valid email, minlength="10"
Required TextField, `type="number"`, `min="100"`
I accept the terms and conditions
{{/form-validations/layout/default}}