File tree Expand file tree Collapse file tree 3 files changed +8
-8
lines changed Expand file tree Collapse file tree 3 files changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -75,8 +75,8 @@ Available built-in type validators include:
75
75
- ` FormBuilderValidators.required() ` - requires the field to have a non-empty value.
76
76
- ` FormBuilderValidators.uppercase() ` - requires the field's value to be uppercase.
77
77
- ` FormBuilderValidators.lowercase() ` - requires the field's value to be lowercase.
78
- - ` FormBuilderValidators.mustBeTrue () ` - requires the field's to be true.
79
- - ` FormBuilderValidators.mustBeFalse () ` - requires the field's to be false.
78
+ - ` FormBuilderValidators.isTrue () ` - requires the field's to be true.
79
+ - ` FormBuilderValidators.isFalse () ` - requires the field's to be false.
80
80
- ` FormBuilderValidators.hasSpecialChars() ` - requires the field's to contain a specified number of special characters.
81
81
- ` FormBuilderValidators.hasUppercaseChars() ` - requires the field's to contain a specified number of uppercase characters.
82
82
- ` FormBuilderValidators.hasLowercaseChars() ` - requires the field's to contain a specified number of lowercase characters.
Original file line number Diff line number Diff line change @@ -657,7 +657,7 @@ class FormBuilderValidators {
657
657
658
658
/// [FormFieldValidator] that requires the field's value to be a bool and true.
659
659
/// * [errorText] is the error message to display when the value is not true
660
- static FormFieldValidator <bool > mustBeTrue ({
660
+ static FormFieldValidator <bool > isTrue ({
661
661
String ? errorText,
662
662
}) =>
663
663
(valueCandidate) => valueCandidate != true
@@ -666,7 +666,7 @@ class FormBuilderValidators {
666
666
667
667
/// [FormFieldValidator] that requires the field's value to be a bool and false.
668
668
/// * [errorText] is the error message to display when the value is not false
669
- static FormFieldValidator <bool > mustBeFalse ({
669
+ static FormFieldValidator <bool > isFalse ({
670
670
String ? errorText,
671
671
}) =>
672
672
(valueCandidate) => valueCandidate != false
Original file line number Diff line number Diff line change @@ -677,9 +677,9 @@ void main() {
677
677
);
678
678
679
679
testWidgets (
680
- 'FormBuilderValidators.mustBeTrue ' ,
680
+ 'FormBuilderValidators.isTrue ' ,
681
681
(WidgetTester tester) => testValidations (tester, (context) {
682
- final validator = FormBuilderValidators .mustBeTrue ();
682
+ final validator = FormBuilderValidators .isTrue ();
683
683
// Pass
684
684
expect (validator (true ), isNull);
685
685
// Fail
@@ -689,9 +689,9 @@ void main() {
689
689
);
690
690
691
691
testWidgets (
692
- 'FormBuilderValidators.mustBeFalse ' ,
692
+ 'FormBuilderValidators.isFalse ' ,
693
693
(WidgetTester tester) => testValidations (tester, (context) {
694
- final validator = FormBuilderValidators .mustBeFalse ();
694
+ final validator = FormBuilderValidators .isFalse ();
695
695
// Pass
696
696
expect (validator (false ), isNull);
697
697
// Fail
You can’t perform that action at this time.
0 commit comments