Skip to content

Commit

Permalink
Shortened error message
Browse files Browse the repository at this point in the history
  • Loading branch information
DCtheTall committed Sep 24, 2018
1 parent 017738b commit b590c6d
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 7 deletions.
3 changes: 1 addition & 2 deletions lib/util/assertString.js
Expand Up @@ -22,8 +22,7 @@ function assertString(input) {
invalidType = 'a ' + invalidType;
}
}
var message = 'This library (validator.js) validates strings only, ';
message += 'instead it received ' + invalidType + '.';
var message = 'Expected string but received ' + invalidType + '.';
throw new TypeError(message);
}
}
Expand Down
3 changes: 1 addition & 2 deletions src/lib/util/assertString.js
Expand Up @@ -13,8 +13,7 @@ export default function assertString(input) {
invalidType = `a ${invalidType}`;
}
}
let message = 'This library (validator.js) validates strings only, ';
message += `instead it received ${invalidType}.`;
let message = `Expected string but received ${invalidType}.`;
throw new TypeError(message);
}
}
3 changes: 1 addition & 2 deletions validator.js
Expand Up @@ -47,8 +47,7 @@ function assertString(input) {
invalidType = 'a ' + invalidType;
}
}
var message = 'This library (validator.js) validates strings only, ';
message += 'instead it received ' + invalidType + '.';
var message = 'Expected string but received ' + invalidType + '.';
throw new TypeError(message);
}
}
Expand Down
2 changes: 1 addition & 1 deletion validator.min.js

Large diffs are not rendered by default.

0 comments on commit b590c6d

Please sign in to comment.