0

I set a rule for my email address field like so

$('#Email').rules("add", {
    required: true,
    email: true
});

but when I type in 'something@gmail.c' (using just 1 or 2 characters after the period) it shows it as valid (good). Is this a correct email extension reg ex or is something wrong here? It even validates to true with 'something@g' and then a tab is pressed!!!

here are some pics

enter image description here

enter image description here

enter image description here

chuckd
  • 13,460
  • 29
  • 152
  • 331
  • There are thousands of top level domains, more than .com .gov .net etc. It's not possible to verify all of them, so it just accepts anything after the period. For example, .na is the country code top level domain for Namibia – Eric Guan Mar 10 '16 at 03:42
  • it's also validating as true if I enter something@g and pres tab. I'll post a pic! – chuckd Mar 10 '16 at 03:52
  • [**jQuery Validate v1.12.0 changelog‌​**: *"Methods: Update email to use HTML5 regex, remove email2 method"*](https://github.com/jzaefferer/jquery-validation/releases/tag/1.12.0) – Sparky Mar 10 '16 at 04:48

0 Answers0