Menu
Web
Web React
Form Validations
Theme
Light Default
Light on Brand
Close
Web
Web React
Form Validations
Theme
Light Default
Light on Brand
Form Validations
Spirit
Form Validations
Form Validations
Real-World examples
Username
ZIP code
Your age (min. 14)
Password
Retype password
Email
Phone
I accept the terms and conditions (required)
Submit
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
Submit
Custom global validator
Required TextField, Range 10 - 30
Submit
Custom validator to a specific field
Required TextField, First Letter Capitalized
Submit
Custom error messages
Required TextField
Required TextField, valid email, minlength="10"
Required TextField,
type="number"
,
min="100"
I accept the terms and conditions
Submit