npm-user-validate
Advanced tools
Comparing version 0.1.4 to 0.1.5
@@ -7,3 +7,3 @@ exports.email = email | ||
username: { | ||
length: 'Name length must be less than or equal to 576 characters long', | ||
length: 'Name length must be less than or equal to 214 characters long', | ||
lowerCase: 'Name must be lowercase', | ||
@@ -32,3 +32,3 @@ urlSafe: 'Name may not contain non-url-safe chars', | ||
if (un.length > 576) { | ||
if (un.length > 214) { | ||
return new Error(requirements.username.length) | ||
@@ -35,0 +35,0 @@ } |
{ | ||
"name": "npm-user-validate", | ||
"version": "0.1.4", | ||
"version": "0.1.5", | ||
"description": "User validations for npm", | ||
@@ -5,0 +5,0 @@ "main": "npm-user-validate.js", |
@@ -25,11 +25,11 @@ var test = require('tap').test | ||
test('username may not be longer than 576 characters', function (t) { | ||
var err = v('bacon-ipsum-dolor-amet-tongue-short-loin-landjaeger-tenderloin-ball-tip-pork-loin-porchetta-pig-pork-chop-beef-ribs-pork-belly--shankle-t-bone-turducken-tongue-landjaeger-pork-loin-beef-chicken-short-loin-venison-capicola--brisket-leberkas-pork-beef-ribs-kevin-short-ribs-tail-bresaola-ham--rump-fatback-short-ribs-frankfurter-boudin--turkey-cupim-tri-tip-pork-chop-landjaeger-frankfurter-ham-hock---kielbasa-sausage-sirloin-short-loin-bacon-tenderloin-biltong-spare-ribs-cow-beef-ribs-tongue-cupim-filet-mignon-drumstick--pork-chop-tenderloin-brisket-pork-belly-leberkas-and-a-pickle') | ||
test('username may not be longer than 214 characters', function (t) { | ||
var err = v('bacon-ipsum-dolor-amet-tongue-short-loin-landjaeger-tenderloin-ball-tip-pork-loin-porchetta-pig-pork-chop-beef-ribs-pork-belly--shankle-t-bone-turducken-tongue-landjaeger-pork-loin-beef-chicken-short-loin-and-pickle') | ||
t.type(err, 'object') | ||
t.match(err.message, /less than or equal to 576/) | ||
t.match(err.message, /less than or equal to 214/) | ||
t.end() | ||
}); | ||
test('username may be as long as 576 characters', function (t) { | ||
var err = v('bacon-ipsum-dolor-amet-tongue-short-loin-landjaeger-tenderloin-ball-tip-pork-loin-porchetta-pig-pork-chop-beef-ribs-pork-belly--shankle-t-bone-turducken-tongue-landjaeger-pork-loin-beef-chicken-short-loin-venison-capicola--brisket-leberkas-pork-beef-ribs-kevin-short-ribs-tail-bresaola-ham--rump-fatback-short-ribs-frankfurter-boudin--turkey-cupim-tri-tip-pork-chop-landjaeger-frankfurter-ham-hock---kielbasa-sausage-sirloin-short-loin-bacon-tenderloin-biltong-spare-ribs-cow-beef-ribs-tongue-cupim-filet-mignon-drumstick--pork-chop-tenderloin-brisket-pork-belly-leberkas-beef') | ||
test('username may be as long as 214 characters', function (t) { | ||
var err = v('bacon-ipsum-dolor-amet-tongue-short-loin-landjaeger-tenderloin-ball-tip-pork-loin-porchetta-pig-pork-chop-beef-ribs-pork-belly--shankle-t-bone-turducken-tongue-landjaeger-pork-loin-beef-chicken-short-loin-porchetta') | ||
t.type(err, 'null') | ||
@@ -36,0 +36,0 @@ t.end() |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
5727
123