diff --git a/src/string.js b/src/string.js index 23079be3e..e2103f565 100644 --- a/src/string.js +++ b/src/string.js @@ -76,9 +76,10 @@ inherits(StringSchema, MixedSchema, { let name; if (options) { - if (typeof options === 'string') message = options; if (typeof options === 'object') { ({ excludeEmptyString, message, name } = options); + } else { + message = options; } }