You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on May 17, 2023. It is now read-only.
To me it seems intrinsic that the length of an undefined or null value is less than any maximum given.
Does this make sense to you? I can create a patch if you are interested, but it's a really simple change to constraints.js:
function createMaxLengthConstraint(maxLength) {
var message = arguments.length <= 1 || arguments[1] === undefined ? null : arguments[1];
return (0, _createConstraint2.default)(function (value) {
return typeof value === "undefined" || value === null || value.length <= maxLength; // if the value is undefined or null, then it is already known to be shorter than required.
}, message || 'Value length is more than ' + maxLength);
}