From 8458b934610c9a6e88860c007e9770d18facb0b7 Mon Sep 17 00:00:00 2001 From: Sven Slootweg Date: Sat, 8 Aug 2020 13:52:21 +0200 Subject: [PATCH] Add error code --- index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.js b/index.js index 7705e5a..0e60707 100644 --- a/index.js +++ b/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" }); } };