0Pricing
HTML Academy · Lesson

The novalidate Attribute

Disable browser validation when handling it yourself.

Browser Validation Limitations

HTML5 built-in validation has limitations:

  • Error messages are browser-dependent and hard to style
  • Validation runs only on submit, not on blur or input
  • Complex business rules (password match, unique username) are impossible

When you need full control, disable built-in validation with novalidate.

novalidate on form

Adding novalidate to a form disables all browser validation:

<form action="/register" method="post" novalidate>
  <!-- Browser will NOT validate these on submit -->
  <input type="email" name="email" required>
  <input type="password" name="password" minlength="8" required>
  <button type="submit">Register</button>
</form>

All lessons in this course

  1. required pattern min max and maxlength
  2. The novalidate Attribute
  3. Constraint Validation API Basics
  4. HTML5 vs JavaScript Validation Trade-offs
← Back to HTML Academy