diff options
author | isaacs <i@izs.me> | 2020-10-16 02:01:14 +0300 |
---|---|---|
committer | isaacs <i@izs.me> | 2020-10-16 02:10:52 +0300 |
commit | 282a1e00820b9abfb3465d044b30b2cade107909 (patch) | |
tree | 17542e777d7c8a3ca400830065223eb3c62266f1 /node_modules/npm-user-validate | |
parent | 6560b8d952a613cefbd900186aa38df53bc201d1 (diff) |
npm-user-validate@1.0.1
Diffstat (limited to 'node_modules/npm-user-validate')
-rw-r--r-- | node_modules/npm-user-validate/npm-user-validate.js | 6 | ||||
-rw-r--r-- | node_modules/npm-user-validate/package.json | 2 |
2 files changed, 6 insertions, 2 deletions
diff --git a/node_modules/npm-user-validate/npm-user-validate.js b/node_modules/npm-user-validate/npm-user-validate.js index 9250ce33a..ffd8791c7 100644 --- a/node_modules/npm-user-validate/npm-user-validate.js +++ b/node_modules/npm-user-validate/npm-user-validate.js @@ -11,6 +11,7 @@ var requirements = exports.requirements = { }, password: {}, email: { + length: 'Email length must be less then or equal to 254 characters long', valid: 'Email must be an email address' } } @@ -45,7 +46,10 @@ function username (un) { } function email (em) { - if (!em.match(/^.+@.+\..+$/)) { + if (em.length > 254) { + return new Error(requirements.email.length) + } + if (!em.match(/^[^@]+@.+\..+$/)) { return new Error(requirements.email.valid) } diff --git a/node_modules/npm-user-validate/package.json b/node_modules/npm-user-validate/package.json index 0509bab94..ffcf1be7f 100644 --- a/node_modules/npm-user-validate/package.json +++ b/node_modules/npm-user-validate/package.json @@ -1,6 +1,6 @@ { "name": "npm-user-validate", - "version": "1.0.0", + "version": "1.0.1", "description": "User validations for npm", "main": "npm-user-validate.js", "devDependencies": { |