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,23 +43,24 @@ 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
@@ -93,6 +94,7 @@ Validators support default errorText messages in this languages:
93
94
- Swahili (sw)
94
95
- Ukrainian (uk)
95
96
- Turkish (tr)
97
+
- Malay (ms)
96
98
97
99
And you can still add your custom error messages.
98
100
@@ -140,6 +142,7 @@ See [pud.dev example tab](https://pub.dev/packages/form_builder_validators/examp
140
142
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.
141
143
142
144
Example:
145
+
143
146
```dart
144
147
TextFormField(
145
148
decoration: InputDecoration(labelText: 'Age'),
@@ -173,17 +176,17 @@ TextFormField(
173
176
174
177
You have some ways to contribute to this packages
175
178
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
179
+
- Beginner: Reporting bugs or request new features
180
+
- Intermediate: Implement new features (from issues or not) and created pull requests
181
+
- Advanced: Join to [organization](#ecosystem) like a member and help coding, manage issues, dicuss new features and other things
179
182
180
-
See [contribution file](https://github.com/flutter-form-builder-ecosystem/.github/blob/main/CONTRIBUTING.md) for more details
183
+
See [contribution file](https://github.com/flutter-form-builder-ecosystem/.github/blob/main/CONTRIBUTING.md) for more details
181
184
182
-
#### Add new supported language
185
+
#### Add new supported language
183
186
184
-
We especially welcome efforts to internationalize/localize the package by translating the default validation `errorText` strings for built-in validation rules.
187
+
We especially welcome efforts to internationalize/localize the package by translating the default validation `errorText` strings for built-in validation rules.
185
188
186
-
1. Add ARB files
189
+
1. Add ARB files
187
190
188
191
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`.
189
192
@@ -221,7 +224,6 @@ Buy a coffe to [Danvick Miller](https://twitter.com/danvickmiller), creator of t
221
224
222
225
-[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)
223
226
224
-
225
227
## Ecosystem
226
228
227
229
Take a look to [our awesome ecosystem](https://github.com/flutter-form-builder-ecosystem) and all packages in there
0 commit comments