Skip to content

Commit c3fafc5

Browse files
committed
Readme
1 parent 4f24f87 commit c3fafc5

File tree

2 files changed

+13
-1
lines changed

2 files changed

+13
-1
lines changed

README.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,18 @@ Available built-in use-case validators include:
116116
- `FormBuilderValidators.bic()` - requires the field's to be an valid BIC.
117117
- `FormBuilderValidators.isbn()` - requires the field's to be an valid ISBN.
118118

119+
Available extension methods used for chaining validators:
120+
121+
- `FormBuilderValidator.and()` - Combines the current validator with another validator using logical AND.
122+
- `FormBuilderValidator.or()` - Combines the current validator with another validator using logical OR.
123+
- `FormBuilderValidator.not()` - Negates the current validator.
124+
- `FormBuilderValidator.when()` - Adds a condition to apply the validator only if the condition is met.
125+
- `FormBuilderValidator.unless()` - Adds a condition to apply the validator only if the condition is not met.
126+
- `FormBuilderValidator.transform()` - Transforms the value before applying the validator.
127+
- `FormBuilderValidator.skipWhen()` - Skips the validator if the condition is met.
128+
- `FormBuilderValidator.log()` - Logs the value during the validation process.
129+
- `FormBuilderValidator.withMessage()` - Overrides the error message of the current validator.
130+
119131
### Supported languages
120132

121133
Validators support default `errorText` messages in these languages:

lib/src/form_field_validator_extensions.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ extension FormFieldValidatorExtensions<T> on FormFieldValidator<T> {
1212
return FormBuilderValidators.or([this, other]);
1313
}
1414

15-
/// Combines the current validator with another validator using logical XOR.
15+
/// Negates the current validator.
1616
FormFieldValidator<T> not() {
1717
return FormBuilderValidators.notEqual(this);
1818
}

0 commit comments

Comments
 (0)