Skip to content

Commit 1f64f29

Browse files
committed
hotfix: empty strings should be allowed
1 parent 68c1469 commit 1f64f29

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

src/validation/Validation.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -139,11 +139,8 @@ export const isOptionsValidator: ValidatorTypeGuard = (prefix, rule) => {
139139
else if (rule.value.length === 0) return `${prefix}.value must be an Array of numbers of strings, got empty Array`;
140140

141141
for (let item of rule.value) {
142-
if (typeof item === 'string') {
143-
if (item.trim() === '') return `${prefix}.value does not support empty strings`;
144-
} else if (typeof item !== 'number') {
142+
if (typeof item !== 'string' && typeof item !== "number")
145143
return `${prefix}.value must be an Array of number or strings, got ${typeof item}`;
146-
}
147144
};
148145
};
149146

0 commit comments

Comments
 (0)