Horje
How to set HTML formnovalidate Attribute in Input

The input formnovalidate attribute specifies that an <input> element should not be validated when submitted.

Note: This attribute overrides the novalidate attribute of the <form> element.

The formnovalidate attribute works with the following input types: submit.


Example of HTML formnovalidate Attribute in Input

A form with two submit buttons (with and without validation):
index.html
Example: HTML
 <form action="/action_page.php">
  <label for="email">Enter your email:</label>
  <input type="email" id="email" name="email"><br><br>
  <input type="submit" value="Submit">
  <input type="submit" formnovalidate="formnovalidate"
  value="Submit without validation">
</form> 

Output should be:

Example of HTML formnovalidate Attribute in Input

Full Example of HTML formnovalidate Attribute in Input

The input formnovalidate attribute
index.html
Example: HTML
<!DOCTYPE html>
<html>
<body>

<h1>The input formnovalidate attribute</h1>

<form action="/action_page.php">
  <label for="email">Enter your email:</label>
  <input type="email" id="email" name="email" required><br><br>
  <input type="submit" value="Submit">
  <input type="submit" formnovalidate="formnovalidate" value="Submit without validation">
</form>

</body>
</html>

Output should be:

Full Example of HTML formnovalidate Attribute in Input





Category:
Web Tutorial
Sub Category:
HTML Input Attributes
Uploaded by:
Admin


Read Article
https://develop.horje.com/learn/1434/reference