Give visitors useful guidance while they fill in the form.
Validation runs in the browser, the moment a field loses focus — not after a full round-trip to the server. Mark a field
required and an empty one can't slip through. Set a field's type to email or number and the format is checked for you. For anything more specific, add a pattern: an order ID, a postcode, a phone shape.
- Required fields block submission until they're filled.
- Email and number types validate format automatically.
- Custom patterns match the exact shape you describe.
Each rule carries its own message, so people see plain guidance like "enter a valid email" instead of a generic error.