Summary -
In this topic, we described about the Formnovalidate with detailed example.
Formnovalidate used to override the novalidate attribute of the <form> element. Formnovalidate applies only to the <form> elements and prevents the validation of a form previously presented.
We can use formnovalidate attribute with input type submit. Formnovalidate attribute overrides the <form> novalidate attribute. Once the form submitted, browser first checks for Formnovalidate attribute and applies novalidate if specified. If Formnovalidate attribute not specified, it checks for <form> novalidate attribute and uses the <form> novalidate if specified.
If both are specified, formnovalidate attribute value considered and <form> novalidate attribute ignored.
Syntax -
<input type="submit" value="Submit" formnovalidate>
Example -
Below example describes about how to formnovalidate attribute used with submit element.
<!DOCTYPE html>
<html>
<body>
<h2>The formnovalidate Attribute</h2>
<form action="form-results.php">
E-mail: <input type="email" name="userid"><br
<input type="submit" value="Submit">
<input type="submit" formnovalidate value="Submit
without validation">
</form>
</body>
</html>