diff --git a/ignite-html-validate.js b/ignite-html-validate.js index 9a1784c..5de8e13 100644 --- a/ignite-html-validate.js +++ b/ignite-html-validate.js @@ -252,7 +252,7 @@ IgniteTemplate.prototype.validateMin = function (min, msg) { */ IgniteTemplate.prototype.validateMax = function (max, msg) { return this.validate((value, error) => { - if (!value || value.toString().trim().length > max) { + if (value && value.toString().trim().length > max) { return error(msg ? msg : `Input must contain less than ${max} character(s).`); } });