jacobfentress
6/30/2014 - 7:30 PM

What's a nice way to tell the browser to ignore all HTML5-related validation, and take over the entire process?

What's a nice way to tell the browser to ignore all HTML5-related validation, and take over the entire process?

<!-- Simple, just add the novalidate property to any element you don't want the browser to validate, like so: -->

<form>
  <input type="email" name="email" required novalidate />
  <input type="password" name="password" required />
  <button type="submit">Log in</button>
</form>

<!-- 
Since you wish to only cancel validation when JavaScript is available, add it with JavaScript (using jQuery for simplified example)

$('input[novalidate]').attr('novalidate', 'novalidate');
-->