Skip to content

Commit 2b3805f

Browse files
committed
WIP
1 parent 43cbce9 commit 2b3805f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

resources/ts/libraries/form-validation.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -464,12 +464,12 @@ export default class FormValidation {
464464

465465
min: (field, rule) => {
466466
const fieldValue = this.getFieldValue( field );
467-
return fieldValue && fieldValue.length < parseInt(rule.value);
467+
return ! [ null, undefined ].includes( fieldValue ) && fieldValue.length < parseInt(rule.value);
468468
},
469469

470470
max: (field, rule) => {
471471
const fieldValue = this.getFieldValue( field );
472-
return fieldValue && fieldValue.length > parseInt(rule.value);
472+
return ! [ null, undefined ].includes( fieldValue ) && fieldValue.length > parseInt(rule.value);
473473
},
474474

475475
regex: (field, rule) => {

0 commit comments

Comments
 (0)