HTML — HTML Forms Validation
You can validate form inputs using HTML alone:
required→ must be filledpattern→ regex checkmin/max→ number limitsmaxlength→ character limit
<form>
Email: <input type='email' required><br>
Age: <input type='number' min='18' max='60'><br>
<button>Submit</button>
</form>