fix: address review feedback for PR #1026

This commit is contained in:
Rudy Celekli committed 2026-10-14 14:17:46 -04:00
1 parent 2c5fb039ce
commit 615ba9a008
2 files changed
+4 -6

No files matched your search

+2 -1
View File
@@ -106,7 +106,8 @@ export function validateValue(schema, value, path = 'arguments') {
fail('must be a string');
break;
}
const length = [...value].length;
let length = 0;
for (const character of value) length += 1;
if (schema.minLength != null && length < schema.minLength)
fail(`must be at least ${schema.minLength} characters`);
if (schema.maxLength != null && length > schema.maxLength)