5

I need to disable default validation of input type='email' like if I don't write '@' or 'gmail.com' it show me default validation pop up I need to disable it and create my own pop up for show it using html of JS

2

2 Answers 2

2

use "novalidate"

"input type="email" novalidate/"

make it type="text", Why you using the type="email", if you don't need its as "email".

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

3 Comments

There is at least one reason to use type="email" even if you don't want default validation: and that reason is browser autofills.
The novalidate attribute belongs in the form element. See developer.mozilla.org/en-US/docs/Web/HTML/Element/…
it is a very good and standard practice to include type="email" to let the browsers on various devices know that the input method should be adjusted to the email, plus it's just semantically correct
1

you can change the input type from email to text, after that you can get input data with input Event listener

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.