Skip to content

Commit 8ca9253

Browse files
chore: implement checker for empty strings
1 parent 2132213 commit 8ca9253

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/validators/base.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ export abstract class BaseValidator<T> {
3030
validate(value: T | undefined | null): ValidationResult {
3131
const errors: ValidationError[] = []
3232

33-
if ((value === undefined || value === null)) {
33+
if ((value === undefined || value === null || value === '')) {
3434
if (!this.isRequired) {
3535
return this.isPartOfShape
3636
? { valid: true, errors: {} }

0 commit comments

Comments
 (0)