Validator.js: Update isEmail to latest specs

Created on 21 Dec 2015  路  4Comments  路  Source: validatorjs/validator.js

needs-vote 馃悰 bug

Most helpful comment

You'll find that a whole bunch of these validate correctly after #258:

> validator.isEmail('"()<>[]:,;@\\\\\\"! #$%&\'*+-\/=?^_`{}| ~.a"@example.com')
true
> validator.isEmail('"pink panther"@example.com')
true
> validator.isEmail('"pink@panther"@example.com')
true
> validator.isEmail('pink.panther@localserver', {require_tld:false})
true
> validator.isEmail('眉ber@m眉nchen.com')
true

A handful don't, though:

All 4 comments

I understand that this could be a lot slower. Perhaps config option for what specs to use?

You'll find that a whole bunch of these validate correctly after #258:

> validator.isEmail('"()<>[]:,;@\\\\\\"! #$%&\'*+-\/=?^_`{}| ~.a"@example.com')
true
> validator.isEmail('"pink panther"@example.com')
true
> validator.isEmail('"pink@panther"@example.com')
true
> validator.isEmail('pink.panther@localserver', {require_tld:false})
true
> validator.isEmail('眉ber@m眉nchen.com')
true

A handful don't, though:

Quick question on this one, yes the spec allows these kind of emails, but which emails are actually used in practice? I'm yet to meet some of these emails, would like people to point me to some examples...

Does it mean that we might need to introduce some strict-mode of sorts to create a difference?

Please place a 馃憤 vote on this comment if you need this feature for your project.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

rathboma picture rathboma  路  4Comments

mfbx9da4 picture mfbx9da4  路  4Comments

malkhuzayyim picture malkhuzayyim  路  4Comments

smohiuddin picture smohiuddin  路  4Comments

IOAyman picture IOAyman  路  4Comments