The formnovalidate attribute is used to disable form validation during form submission. It allows the form to be submitted even if some input fields contain invalid data.
- Skips form validation when the form is submitted.
- Works with <input type="submit">.
- Overrides the form’s default validation behavior for that submission.
Syntax:
<input formnovalidate="formnovalidate">Example: Illustrate the use of <input> formnovalidate Attribute.
<!--Driver Code Starts-->
<!DOCTYPE html>
<html>
<head>
<title>
HTML Input formNoValidate Attribute
</title>
<style>
h1 {
color: green;
}
</style>
</head>
<!--Driver Code Ends-->
<body style="text-align:center;">
<h1>
GeeksforGeeks
</h1>
<h4>
HTML input formnovalidate Attribute
</h4>
<form action="#" method="get" target="_self">
Username:
<input type="email" name="userid">
<input type="submit" id="Geeks" name="myGeeks"
value="Submit @ geeksforgeeks" formTarget="_blank"
formnovalidate>
</form>
</body>
<!--Driver Code Starts-->
</html>
<!--Driver Code Ends-->