Fix maxLength check

This commit is contained in:
toasted-nutbread 2020-02-01 22:20:47 -05:00
parent 52b623b5cd
commit 0171d86b28

View File

@ -339,7 +339,7 @@ class JsonSchemaProxyHandler {
return 'String length too short'; return 'String length too short';
} }
const maxLength = schema.minLength; const maxLength = schema.maxLength;
if (typeof maxLength === 'number' && value.length > maxLength) { if (typeof maxLength === 'number' && value.length > maxLength) {
return 'String length too long'; return 'String length too long';
} }