DEPRECATED, DO NOT USE THIS PROJECT. Transliteration of html5 email validator in Firefox
Перейти к файлу
Shane Tomlinson 1be3a663aa
Merge pull request #12 from Mozilla-GitHub-Standards/master r=@shane-tomlinson
Add Mozilla Code of Conduct
2019-04-01 16:18:26 +01:00
CODE_OF_CONDUCT.md Add Mozilla Code of Conduct file 2019-03-29 10:00:19 -07:00
LICENSE Add full text of MPL license 2015-08-12 19:14:03 -07:00
README.md Add code formatting to README 2015-08-13 11:48:08 -07:00
index.js fix(src): fix typos in files 2015-08-13 10:11:54 -07:00
package.json Initial commit with fxa email validator. 2015-08-12 19:03:56 -07:00

README.md

micro-email-validator

Transliteration of html5 email validator in Firefox

What is it?

From teh codez:

// Function to validate an email address.
// This is a transliteration of the HTML5 email-validation logic
// inside Firefox.  It splits the username and domain portions,
// translates them into IDN punycode syntax, then does some very
// basic sanity-checking.

How to use it?

var validate = require('micro-email-validator');

validate('user@example.com'); // returns true

validate('foo@foo@foo'); // returns false

validate('例子@example.com'); // returns true, yay

Please note, however, that these rules are more liberal than you might think:

validate('wow_such@unsatisfy'); // returns true

validate('wat@'); // returns true

Have fun!

License

MPL 2.0

Brought to you by

The fine minds behind Firefox Accounts, and your humble narrator.