Skip to content

Commit df2439e

Browse files
Update README.md
1 parent 1d15895 commit df2439e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -382,8 +382,8 @@ We welcome efforts to internationalize/localize the package by translating the d
382382
#### Add new validator
383383

384384
1. Add a new validator to one of the folders in the `src` folder.
385-
2. Implement it using the `BaseValidator` or `TranslatedValidator` class. Override the `validateValue` method and let the base class handle the null check in the `validate` method. When using a translation also override `translatedErrorText`.
386-
3. Override the `translatedErrorText` property and return the correct translation from `FormBuilderLocalizations.current.`.
385+
2. Implement it using the `BaseValidator` or `TranslatedValidator` class. Override the `validateValue` method and let the base class handle the null check in the `validate` method.
386+
3. When using a `TranslatedValidator, Override the `translatedErrorText` property and return the correct translation from `FormBuilderLocalizations.current.`.
387387
4. Make sure to pass `errorText` and `checkNullOrEmpty` to the base class.
388388
5. Add static method to `form_builder_validators.dart` that uses the new validator.
389389
6. Implement tests

0 commit comments

Comments
 (0)