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
/// Ensures the value entered is numeric - with a custom error message
169
-
FormBuilderValidators.numeric(errorText: 'La edad debe ser numérica.'),
168
+
/// Ensures the value entered is numeric - with a custom error message
169
+
FormBuilderValidators.numeric(errorText: 'La edad debe ser numérica.'),
170
170
171
-
/// Sets a maximum value of 70
172
-
FormBuilderValidators.max(70),
171
+
/// Sets a maximum value of 70
172
+
FormBuilderValidators.max(70),
173
173
174
-
/// Include your own custom `FormFieldValidator` function, if you want
175
-
/// Ensures positive values only. We could also have used `FormBuilderValidators.min(0)` instead
176
-
(val) {
177
-
final number = int.tryParse(val);
178
-
if (number == null) return null;
179
-
if (number < 0) return 'We cannot have a negative age';
180
-
return null;
181
-
}
174
+
/// Include your own custom `FormFieldValidator` function, if you want
175
+
/// Ensures positive values only. We could also have used `FormBuilderValidators.min(0)` instead
176
+
(val) {
177
+
final number = int.tryParse(val);
178
+
if (number == null) return null;
179
+
if (number < 0) return 'We cannot have a negative age';
180
+
return null;
181
+
}
182
182
]),
183
183
),
184
184
```
@@ -194,7 +194,7 @@ see [override_form_builder_localizations_en](example/lib/override_form_builder_l
194
194
You have some ways to contribute to this package.
195
195
196
196
- Beginner: Reporting bugs or requesting new features
197
-
- Intermediate: Answer questions, implement new features (from issues or not) and create pull requests
197
+
- Intermediate: Answer questions, implement new features (from issues or not), and create pull requests
198
198
- Advanced: Join [organization](#ecosystem) like a member and help to code, manage issues, discuss new features, and other things
199
199
200
200
See the [contribution file](https://github.com/flutter-form-builder-ecosystem/.github/blob/main/CONTRIBUTING.md) for more details
@@ -205,42 +205,42 @@ We welcome efforts to internationalize/localize the package by translating the d
205
205
206
206
1. Add ARB files
207
207
208
-
Create one ARB file inside the `lib/l10n` folder for each locale 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`.
208
+
Create one ARB file inside the `lib/l10n` folder for each locale 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`.
209
209
210
210
2. Translate the error messages
211
211
212
-
Copy and paste the contents of `intl_en.arb` into your newly created ARB file. Then translate the error messages by overwriting the default messages.
212
+
Copy and paste the contents of `intl_en.arb` into your newly created ARB file. Then translate the error messages by overwriting the default messages.
213
213
214
214
3. Generate localization code
215
215
216
-
To generate boilerplate code for localization, run the generate command inside the package directory where `pubspec.yaml` file is located:
216
+
To generate boilerplate code for localization, run the generate command inside the package directory where `pubspec.yaml` file is located:
217
217
218
-
`flutter gen-l10n`
218
+
`flutter gen-l10n`
219
219
220
-
The command will automatically create/update files inside the `lib/localization` directory, including your newly added locale support.
220
+
The command will automatically create/update files inside the `lib/localization` directory, including your newly added locale support.
221
221
222
222
4. Update README
223
223
224
-
Remember to update README, adding the new language (and language code) under [Supported languages section](#supported-languages) in alphabetic order, so that everyone knows your new language is now supported!
224
+
Remember to update README, adding the new language (and language code) under [Supported languages section](#supported-languages) in alphabetic order, so that everyone knows your new language is now supported!
225
225
226
226
5. Submit PR
227
227
228
-
Submit your PR and be of help to millions of developers all over the world!
228
+
Submit your PR and be of help to millions of developers all over the world!
229
229
230
230
#### Add new validator
231
231
232
232
1. Add method to `validators.dart` with your Dart documentation
233
233
2. Implement tests
234
234
3. Add to [validators](#validators) with name and description
235
235
4. Add message error translated on all languages (yes, all languages). To accomplish this need:
236
-
a. Add property to all `intl_*.arb` files, on alphabetic order.
237
-
b. Translate message on all languages.
236
+
a. Add property to all `intl_*.arb` files, in alphabetic order.
237
+
b. Translate message in all languages.
238
238
c. Run `flutter gen-l10n` command
239
239
5. Submit PR
240
240
241
241
### Questions and answers
242
242
243
-
You can ask questions or search answers on [Github discussion](https://github.com/flutter-form-builder-ecosystem/form_builder_validators/discussions) or on [StackOverflow](https://stackoverflow.com/questions/tagged/flutter-form-builder)
243
+
You can ask questions or search for answers on [Github discussion](https://github.com/flutter-form-builder-ecosystem/form_builder_validators/discussions) or on [StackOverflow](https://stackoverflow.com/questions/tagged/flutter-form-builder)
0 commit comments