Browse Source

Add error code

master
Sven Slootweg 1 year ago
parent
commit
8458b93461
  1. 2
      index.js

2
index.js

@ -5,6 +5,6 @@ const isString = require("is-string");
module.exports = function (value) {
if (!isString(value)) {
return new ValidationError("Must be a string");
return new ValidationError("Must be a string", { code: "validatem.is-string" });
}
};
Loading…
Cancel
Save