@@ -323,8 +323,8 @@ class FormBuilderValidators {
323
323
String ? errorText,
324
324
}) =>
325
325
(valueCandidate) => true == valueCandidate? .isNotEmpty &&
326
- ! isCreditCardExpirationDate (valueCandidate! ) &&
327
- ! isNotExpiredCreditCardDate (valueCandidate)
326
+ ! isCreditCardExpirationDate (valueCandidate! ) ||
327
+ ! isNotExpiredCreditCardDate (valueCandidate! )
328
328
? errorText ??
329
329
FormBuilderLocalizations .current.creditCardExpiredErrorText
330
330
: null ;
@@ -520,10 +520,10 @@ class FormBuilderValidators {
520
520
}) =>
521
521
(valueCandidate) => true == valueCandidate? .isNotEmpty &&
522
522
specialCharLength (valueCandidate! ) >= atLeast
523
- ? errorText ??
523
+ ? null
524
+ : errorText ??
524
525
FormBuilderLocalizations .current
525
- .containsSpecialCharErrorText (atLeast)
526
- : null ;
526
+ .containsSpecialCharErrorText (atLeast);
527
527
528
528
/// [FormFieldValidator] that requires the field's value to contain an amount of uppercase characters.
529
529
static FormFieldValidator <String > hasUppercaseChars ({
@@ -532,10 +532,10 @@ class FormBuilderValidators {
532
532
}) =>
533
533
(valueCandidate) => true == valueCandidate? .isNotEmpty &&
534
534
uppercaseCharLength (valueCandidate! ) >= atLeast
535
- ? errorText ??
535
+ ? null
536
+ : errorText ??
536
537
FormBuilderLocalizations .current
537
- .containsUppercaseCharErrorText (atLeast)
538
- : null ;
538
+ .containsUppercaseCharErrorText (atLeast);
539
539
540
540
/// [FormFieldValidator] that requires the field's value to contain an amount of lowercase characters.
541
541
static FormFieldValidator <String > hasLowercaseChars ({
@@ -544,10 +544,10 @@ class FormBuilderValidators {
544
544
}) =>
545
545
(valueCandidate) => true == valueCandidate? .isNotEmpty &&
546
546
lowercaseCharLength (valueCandidate! ) >= atLeast
547
- ? errorText ??
547
+ ? null
548
+ : errorText ??
548
549
FormBuilderLocalizations .current
549
- .containsLowercaseCharErrorText (atLeast)
550
- : null ;
550
+ .containsLowercaseCharErrorText (atLeast);
551
551
552
552
/// [FormFieldValidator] that requires the field's value to contain an amount of numeric characters.
553
553
static FormFieldValidator <String > hasNumericChars ({
@@ -556,7 +556,7 @@ class FormBuilderValidators {
556
556
}) =>
557
557
(valueCandidate) => true == valueCandidate? .isNotEmpty &&
558
558
numberCharLength (valueCandidate! ) >= atLeast
559
- ? errorText ??
560
- FormBuilderLocalizations .current. containsNumberErrorText (atLeast)
561
- : null ;
559
+ ? null
560
+ : errorText ??
561
+ FormBuilderLocalizations .current. containsNumberErrorText (atLeast) ;
562
562
}
0 commit comments