button formnovalidate Attribute - HTML CSS HTML Tag

HTML CSS examples for HTML Tag:button

Description

The formnovalidate attribute is a boolean attribute to set if the form-data should be validated on submission. This attribute overrides the form's novalidate attribute.

The formnovalidate attribute is only used for buttons with type="submit".

In XHTML, the formnovalidate attribute must be defined as <button type="submit" formnovalidate="formnovalidate">.

A form with two submit buttons. The first submit button submits the form data with default validation, and the second submits the form data without validation:

Demo Code

ResultView the demo in separate window

<!DOCTYPE html>
<html>
<body>

<form action="/action_page.php" method="get">
  E-mail: <input type="email" name="userid"><br>
  <button type="submit">Submit</button><br>
  <button type="submit" formnovalidate>Submit without validation</button>
</form><!--from  w  w w . ja  va 2  s  .c om-->

</body>
</html>

Related Tutorials