Skip to content

Commit

Permalink
Nabbed one other one I missed
Browse files Browse the repository at this point in the history
  • Loading branch information
mikermcneil committed Apr 1, 2018
1 parent 7d77b02 commit 4e519da
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/rules.js
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,10 @@ var rules = {
ignoreEmptyString: true
},
'isUUID': {
fn: validator.isUUID,
fn: function(x) {
if (typeof x !== 'string') { throw new Error ('Value was not a string.'); }
return validator.isUUID(x);
},
expectedTypes: ['json', 'ref', 'string'],
defaultErrorMessage: 'Value was not a valid UUID.',
ignoreEmptyString: true
Expand Down

0 comments on commit 4e519da

Please sign in to comment.