summaryrefslogtreecommitdiff
path: root/deps/npm/node_modules/npm-user-validate/npm-user-validate.js
diff options
context:
space:
mode:
Diffstat (limited to 'deps/npm/node_modules/npm-user-validate/npm-user-validate.js')
-rw-r--r--deps/npm/node_modules/npm-user-validate/npm-user-validate.js11
1 files changed, 8 insertions, 3 deletions
diff --git a/deps/npm/node_modules/npm-user-validate/npm-user-validate.js b/deps/npm/node_modules/npm-user-validate/npm-user-validate.js
index f18e13ccf7..c9da9cd1c9 100644
--- a/deps/npm/node_modules/npm-user-validate/npm-user-validate.js
+++ b/deps/npm/node_modules/npm-user-validate/npm-user-validate.js
@@ -4,9 +4,10 @@ exports.username = username
var requirements = exports.requirements = {
username: {
- lowerCase: 'Username must be lowercase',
- urlSafe: 'Username may not contain non-url-safe chars',
- dot: 'Username may not start with "."'
+ length: 'Name length must be less than or equal to 576 characters long',
+ lowerCase: 'Name must be lowercase',
+ urlSafe: 'Name may not contain non-url-safe chars',
+ dot: 'Name may not start with "."'
},
password: {},
email: {
@@ -27,6 +28,10 @@ function username (un) {
return new Error(requirements.username.dot)
}
+ if (un.length > 576) {
+ return new Error(requirements.username.length)
+ }
+
return null
}