# Form validation
We recommend using HTML5's built-in validation. It is very rich these days, and has good browser support.
# Resources
- MDN: Form data validation (opens new window)
- HTML5 validation browser support (opens new window)
- MDN: the input element (opens new window)
# Example
The required
attribute is a boolean attribute.
When present, it specifies that an input field must be filled out before submitting the form.
<form action="https://submit-form.com/your-form-id">
<input type="email" name="email" required />
<textarea name="message" required></textarea>
<button type="submit">Send</button>
</form>