Reputation: 740
<input type="text" id="newFname" pattern="^[a-zA-z0-9 _-]{2,}$" required placeholder="First Name" />
<input type="text" id="newLname" pattern="^[a-zA-z0-9 _-]{2,}$" required placeholder="Last Name"/>
Is it possible to disable html validation on second input without modifying pattern or required attributes?
Upvotes: 0
Views: 76
Reputation: 490
What you could do, put the inputs in separate forms and add the novalidate
attribute to the second form.
Check this page for more information.
Upvotes: 1