0
<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?

3
  • I'm pretty sure the only way to disable html validation is to modify those attributes. Commented Jul 7, 2014 at 12:12
  • 4
    What is the reason you would want to disable validation and yet leave these attributes there? I'm curious. Commented Jul 7, 2014 at 12:16
  • I just thought that it would be easier if I can achieve it by changing some one attribute instead of two. Commented Jul 7, 2014 at 16:04

1 Answer 1

1

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.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.