🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
Socket

common-errors

Package Overview
Dependencies
Maintainers
1
Versions
47
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

common-errors - npm Package Compare versions

Comparing version

to
0.4.17

2

package.json

@@ -5,3 +5,3 @@ {

"description": "Common error classes and utility functions",
"version": "0.4.16",
"version": "0.4.17",
"repository": {

@@ -8,0 +8,0 @@ "type": "git",

@@ -532,5 +532,5 @@ common-errors

function validateUsername(username){
var errors = [];
if(username.length < 3) errors.push(new errors.ValidationError("username must be at least two characters long", "VAL_MIN_USERNAME_LENGTH", "username"));
if(/-%$*&!/.test(username)) errors.push(new errors.ValidationError("username may not contain special characters", "VAL_USERNAME_SPECIALCHARS", "username"));
var errors = new errors.ValidationError();
if(username.length < 3) errors.addError(new errors.ValidationError("username must be at least two characters long", "VAL_MIN_USERNAME_LENGTH", "username"));
if(/-%$*&!/.test(username)) errors.addError(new errors.ValidationError("username may not contain special characters", "VAL_USERNAME_SPECIALCHARS", "username"));
return errors;

@@ -537,0 +537,0 @@ }