Jackie Chan
Jackie Chan

Reputation: 2662

Invalid quatifier. jQuery.validation.js

After a quick research here and here, the solutions didn't work for my project.

Here is the regex:

"^([A-Za-z0-9\._%-]+@[A-Za-z0-9\.-]+\.[A-Za-z]{2,4}+[;]?)(?:[;][A-Za-z0-9\._%-]+@[A-Za-z0-9\.-]+\.[A-Za-z]{2,4}+[;]?)*$|^$"

And here is an error that firebug fires at me whenever I reach email validation step (see regex above):

invalid quantifier
hasformat()jquery...tion.js (line 211)
pattern = "\^([A-Za-z0-9\._%-]+@[A...-Za-z]{2,4}+[;]?)*$|^$\"

Upvotes: 0

Views: 194

Answers (1)

Robbie
Robbie

Reputation: 19500

I think it's the + after the two sets of {2,4}

removed like below gets it running but may not be what you need for the pattern

^([A-Za-z0-9\._%-]+@[A-Za-z0-9\.-]+\.[A-Za-z]{2,4}[;]?)(?:[;][A-Za-z0-9\._%-]+@[A-Za-z0-9\.-]+\.[A-Za-z]{2,4}[;]?)*$|^$

Upvotes: 2

Related Questions