@@ -581,14 +581,18 @@ class FormBuilderValidators {
581
581
[
582
582
FormBuilderValidators .minLength (minLength, errorText: errorText),
583
583
FormBuilderValidators .maxLength (maxLength, errorText: errorText),
584
- FormBuilderValidators .hasUppercaseChars (
585
- atLeast: uppercase, errorText: errorText),
586
- FormBuilderValidators .hasLowercaseChars (
587
- atLeast: lowercase, errorText: errorText),
588
- FormBuilderValidators .hasNumericChars (
589
- atLeast: number, errorText: errorText),
590
- FormBuilderValidators .hasSpecialChars (
591
- atLeast: specialChar, errorText: errorText),
584
+ if (uppercase > 0 )
585
+ FormBuilderValidators .hasUppercaseChars (
586
+ atLeast: uppercase, errorText: errorText),
587
+ if (lowercase > 0 )
588
+ FormBuilderValidators .hasLowercaseChars (
589
+ atLeast: lowercase, errorText: errorText),
590
+ if (number > 0 )
591
+ FormBuilderValidators .hasNumericChars (
592
+ atLeast: number, errorText: errorText),
593
+ if (specialChar > 0 )
594
+ FormBuilderValidators .hasSpecialChars (
595
+ atLeast: specialChar, errorText: errorText),
592
596
],
593
597
);
594
598
}
0 commit comments