You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
> To migrate from v7 to v8, remove `context` as a parameter to validator functions. For example, `FormBuilderValidators.required(context)` becomes `FormBuilderValidators.required()` without context passed to it.
18
17
19
18
-[Features](#features)
20
19
-[Validators](#validators)
21
20
-[Supported languages](#supported-languages)
22
21
-[Use](#use)
23
-
-[Setup](#setup)
24
-
-[Basic use](#basic-use)
25
-
-[Especific uses](#especific-uses)
22
+
-[Setup](#setup)
23
+
-[Basic use](#basic-use)
24
+
-[Especific uses](#especific-uses)
26
25
-[Support](#support)
27
-
-[Contribute](#contribute)
28
-
-[Questions and answers](#questions-and-answers)
29
-
-[Donations](#donations)
26
+
-[Contribute](#contribute)
27
+
-[Questions and answers](#questions-and-answers)
28
+
-[Donations](#donations)
30
29
-[Roadmap](#roadmap)
31
30
-[Ecosystem](#ecosystem)
32
31
-[Thanks to](#thanks-to)
33
-
-[Contributors](#contributors)
32
+
-[Contributors](#contributors)
33
+
34
34
35
35
## Features
36
36
@@ -43,24 +43,23 @@ This package comes with several most common `FormFieldValidator`s such as requir
-`FormBuilderValidators.creditCard()` - requires the field's value to be a valid credit card number.
48
-
-`FormBuilderValidators.date()` - requires the field's value to be a valid date string.
49
-
-`FormBuilderValidators.email()` - requires the field's value to be a valid email address.
50
-
-`FormBuilderValidators.equal()` - requires the field's value be equal to provided object.
51
-
-`FormBuilderValidators.integer()` - requires the field's value to be an integer.
52
-
-`FormBuilderValidators.ip()` - requires the field's value to be a valid IP address.
53
-
-`FormBuilderValidators.match()` - requires the field's value to match the provided regex pattern.
54
-
-`FormBuilderValidators.max()` - requires the field's value to be less than or equal to the provided number.
55
-
-`FormBuilderValidators.maxLength()` - requires the length of the field's value to be less than or equal to the provided maximum length.
56
-
-`FormBuilderValidators.min()` - requires the field's value to be greater than or equal to the provided number.
57
-
-`FormBuilderValidators.minLength()` - requires the length of the field's value to be greater than or equal to the provided minimum length.
58
-
-`FormBuilderValidators.equalLength()` - requires the length of the field's value to be equal to the provided minimum length.
59
-
-`FormBuilderValidators.numeric()` - requires the field's value to be a valid number.
60
-
-`FormBuilderValidators.required()` - requires the field have a non-empty value.
61
-
-`FormBuilderValidators.url()` - requires the field's value to be a valid url.
62
-
63
-
### Supported languages
46
+
*`FormBuilderValidators.creditCard()` - requires the field's value to be a valid credit card number.
47
+
*`FormBuilderValidators.date()` - requires the field's value to be a valid date string.
48
+
*`FormBuilderValidators.email()` - requires the field's value to be a valid email address.
49
+
*`FormBuilderValidators.equal()` - requires the field's value be equal to provided object.
50
+
*`FormBuilderValidators.integer()` - requires the field's value to be an integer.
51
+
*`FormBuilderValidators.ip()` - requires the field's value to be a valid IP address.
52
+
*`FormBuilderValidators.match()` - requires the field's value to match the provided regex pattern.
53
+
*`FormBuilderValidators.max()` - requires the field's value to be less than or equal to the provided number.
54
+
*`FormBuilderValidators.maxLength()` - requires the length of the field's value to be less than or equal to the provided maximum length.
55
+
*`FormBuilderValidators.min()` - requires the field's value to be greater than or equal to the provided number.
56
+
*`FormBuilderValidators.minLength()` - requires the length of the field's value to be greater than or equal to the provided minimum length.
57
+
*`FormBuilderValidators.equalLength()` - requires the length of the field's value to be equal to the provided minimum length.
58
+
*`FormBuilderValidators.numeric()` - requires the field's value to be a valid number.
59
+
*`FormBuilderValidators.required()` - requires the field have a non-empty value.
60
+
*`FormBuilderValidators.url()` - requires the field's value to be a valid url.
61
+
62
+
### Supported languages
64
63
65
64
Validators support default errorText messages in this languages:
66
65
@@ -141,7 +140,6 @@ See [pud.dev example tab](https://pub.dev/packages/form_builder_validators/examp
141
140
On validation, each validator is run, and if any one validator returns a non-null value (i.e., a String), validation fails, and the `errorText` for the field is set as the returned string.
142
141
143
142
Example:
144
-
145
143
```dart
146
144
TextFormField(
147
145
decoration: InputDecoration(labelText: 'Age'),
@@ -175,17 +173,17 @@ TextFormField(
175
173
176
174
You have some ways to contribute to this packages
177
175
178
-
- Beginner: Reporting bugs or request new features
179
-
- Intermediate: Implement new features (from issues or not) and created pull requests
180
-
- Advanced: Join to [organization](#ecosystem) like a member and help coding, manage issues, dicuss new features and other things
176
+
- Beginner: Reporting bugs or request new features
177
+
- Intermediate: Implement new features (from issues or not) and created pull requests
178
+
- Advanced: Join to [organization](#ecosystem) like a member and help coding, manage issues, dicuss new features and other things
181
179
182
-
See [contribution file](https://github.com/flutter-form-builder-ecosystem/.github/blob/main/CONTRIBUTING.md) for more details
180
+
See [contribution file](https://github.com/flutter-form-builder-ecosystem/.github/blob/main/CONTRIBUTING.md) for more details
183
181
184
-
#### Add new supported language
182
+
#### Add new supported language
185
183
186
-
We especially welcome efforts to internationalize/localize the package by translating the default validation `errorText` strings for built-in validation rules.
184
+
We especially welcome efforts to internationalize/localize the package by translating the default validation `errorText` strings for built-in validation rules.
187
185
188
-
1. Add ARB files
186
+
1. Add ARB files
189
187
190
188
Create one ARB file inside the `lib/l10n` folder for each of the locales you need to add support. Name the files in the following way: `intl_<LOCALE_ISO_CODE>.arb`. For example: `intl_fr.arb` or `intl_fr_FR.arb`.
191
189
@@ -223,6 +221,7 @@ Buy a coffe to [Danvick Miller](https://twitter.com/danvickmiller), creator of t
223
221
224
222
-[Solve open issues](https://github.com/flutter-form-builder-ecosystem/form_builder_validators/issues), [prioritizing bugs](https://github.com/flutter-form-builder-ecosystem/form_builder_validators/labels/bug)
225
223
224
+
226
225
## Ecosystem
227
226
228
227
Take a look to [our awesome ecosystem](https://github.com/flutter-form-builder-ecosystem) and all packages in there
0 commit comments