0

I'm trying to validate a <input type="email"> using the jQuery validate plugin and the actual validation works fine, but it appears that if incorrect value has been entered and an error message appears, the error message remains after the error has been corrected.

Am I doing something wrong or does the validate plugin simply not support type="email" inputs?

3 Answers 3

2

The validation plugin can't handle input type of email yet.

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

Comments

0

you have to give <input class="email"/>

1 Comment

i am talking about < input type=email> in html 5
0

Usually, jQuery validation is lazy. It won't validate until you try to submit the form. Or call the isValid() method. Once it has done a validation though, it will become eager: It will validate every field as soon as the field loses focus.

On another note: Shouldn't that be class="email"? No too sure about it though, just a comment (which I can't do yet).

You might want to slap some code in here, so we can see what it's actually doing.

2 Comments

HTML5 forms support a new type of email for an input element and do their own built in validation (not very good at that) for emails. Even if you add the "email" class to the element, the validation plugin won't work with it yet.
@user156629 Ah, I was under the impression he was just using a 'text' input to get an email. Because you can use class="email" on that. That's where my confusion came from, I guess.

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.