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.
17
18
18
19
-[Features](#features)
19
20
-[Validators](#validators)
20
21
-[Supported languages](#supported-languages)
21
22
-[Use](#use)
22
-
-[Setup](#setup)
23
-
-[Basic use](#basic-use)
24
-
-[Especific uses](#especific-uses)
23
+
-[Setup](#setup)
24
+
-[Basic use](#basic-use)
25
+
-[Especific uses](#especific-uses)
25
26
-[Support](#support)
26
-
-[Contribute](#contribute)
27
-
-[Questions and answers](#questions-and-answers)
28
-
-[Donations](#donations)
27
+
-[Contribute](#contribute)
28
+
-[Questions and answers](#questions-and-answers)
29
+
-[Donations](#donations)
29
30
-[Roadmap](#roadmap)
30
31
-[Ecosystem](#ecosystem)
31
32
-[Thanks to](#thanks-to)
32
-
-[Contributors](#contributors)
33
-
33
+
-[Contributors](#contributors)
34
34
35
35
## Features
36
36
@@ -43,31 +43,34 @@ 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.
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
46
+
47
+
-`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
63
64
64
65
Validators support default errorText messages in this languages:
65
66
66
67
- Arabic (ar)
67
68
- Bangla (bn)
69
+
- Bosnian (bs)
68
70
- Catalan (ca)
69
71
- Chinese Simplified (zh_Hans)
70
72
- Chinese Traditional (zh_Hant)
73
+
- Croatian (hr)
71
74
- Czech (cs)
72
75
- English (en)
73
76
- Estonian (et)
@@ -138,6 +141,7 @@ See [pud.dev example tab](https://pub.dev/packages/form_builder_validators/examp
138
141
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.
139
142
140
143
Example:
144
+
141
145
```dart
142
146
TextFormField(
143
147
decoration: InputDecoration(labelText: 'Age'),
@@ -171,17 +175,17 @@ TextFormField(
171
175
172
176
You have some ways to contribute to this packages
173
177
174
-
- Beginner: Reporting bugs or request new features
175
-
- Intermediate: Implement new features (from issues or not) and created pull requests
176
-
- Advanced: Join to [organization](#ecosystem) like a member and help coding, manage issues, dicuss new features and other things
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
177
181
178
-
See [contribution file](https://github.com/flutter-form-builder-ecosystem/.github/blob/main/CONTRIBUTING.md) for more details
182
+
See [contribution file](https://github.com/flutter-form-builder-ecosystem/.github/blob/main/CONTRIBUTING.md) for more details
179
183
180
-
#### Add new supported language
184
+
#### Add new supported language
181
185
182
-
We especially welcome efforts to internationalize/localize the package by translating the default validation `errorText` strings for built-in validation rules.
186
+
We especially welcome efforts to internationalize/localize the package by translating the default validation `errorText` strings for built-in validation rules.
183
187
184
-
1. Add ARB files
188
+
1. Add ARB files
185
189
186
190
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`.
187
191
@@ -219,7 +223,6 @@ Buy a coffe to [Danvick Miller](https://twitter.com/danvickmiller), creator of t
219
223
220
224
-[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)
221
225
222
-
223
226
## Ecosystem
224
227
225
228
Take a look to [our awesome ecosystem](https://github.com/flutter-form-builder-ecosystem) and all packages in there
0 commit comments