Skip to content

Commit 1fea5ed

Browse files
authored
Update README.md
1 parent 01b6dc1 commit 1fea5ed

File tree

1 file changed

+22
-23
lines changed

1 file changed

+22
-23
lines changed

README.md

Lines changed: 22 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,13 @@
11
# Form Builder Validators
22

3-
Form Builder Validators set of validators for any `FormField` widget or widgets that extend the `FormField` class - _e.g._, `TextFormField`, `DropdownFormField`, _et cetera_. It provides standard ready-made validation rules and a way to compose new validation rules combining multiple rules, including custom ones.
3+
Form Builder Validators set of validators for any `FormField` widget or widgets that extend the `FormField` class - *e.g.*, `TextFormField`, `DropdownFormField`, *et cetera*. It provides standard ready-made validation rules and a way to compose new validation rules combining multiple rules, including custom ones.
44

55
Also included is the `l10n` / `i18n` of error text messages to multiple languages.
66

77
[![Pub Version](https://img.shields.io/pub/v/form_builder_validators?logo=flutter&style=for-the-badge)](https://pub.dev/packages/form_builder_validators)
88
[![GitHub Workflow Status](https://img.shields.io/github/actions/workflow/status/flutter-form-builder-ecosystem/form_builder_validators/base.yaml?branch=main&logo=github&style=for-the-badge)](https://github.com/flutter-form-builder-ecosystem/form_builder_validators/actions/workflows/base.yaml)
99
[![Codecov](https://img.shields.io/codecov/c/github/flutter-form-builder-ecosystem/form_builder_validators?logo=codecov&style=for-the-badge)](https://codecov.io/gh/flutter-form-builder-ecosystem/form_builder_validators/)
1010
[![CodeFactor Grade](https://img.shields.io/codefactor/grade/github/flutter-form-builder-ecosystem/form_builder_validators?logo=codefactor&style=for-the-badge)](https://www.codefactor.io/repository/github/flutter-form-builder-ecosystem/form_builder_validators)
11-
1211
---
1312

1413
> ## Migrating from version 7 to 8
@@ -19,19 +18,19 @@ Also included is the `l10n` / `i18n` of error text messages to multiple language
1918

2019
- [Features](#features)
2120
- [Validators](#validators)
22-
- [Supported languages](#supported-languages)
21+
- [Supported languages](#supported-languages)
2322
- [Use](#use)
24-
- [Setup](#setup)
25-
- [Basic use](#basic-use)
26-
- [Specific uses](#specific-uses)
27-
- [Composing multiple validators](#composing-multiple-validators)
28-
- [Modify the default error message in a specific language](#modify-the-default-error-message-in-a-specific-language)
23+
- [Setup](#setup)
24+
- [Basic use](#basic-use)
25+
- [Specific uses](#specific-uses)
26+
- [Composing multiple validators](#composing-multiple-validators)
27+
- [Modify the default error message in a specific language](#modify-the-default-error-message-in-a-specific-language)
2928
- [Support](#support)
30-
- [Contribute](#contribute)
31-
- [Add new supported language](#add-new-supported-language)
32-
- [Add new validator](#add-new-validator)
33-
- [Questions and answers](#questions-and-answers)
34-
- [Donations](#donations)
29+
- [Contribute](#contribute)
30+
- [Add new supported language](#add-new-supported-language)
31+
- [Add new validator](#add-new-validator)
32+
- [Questions and answers](#questions-and-answers)
33+
- [Donations](#donations)
3534
- [Roadmap](#roadmap)
3635
- [Ecosystem](#ecosystem)
3736
- [Thanks to](#thanks-to)
@@ -215,13 +214,13 @@ TextFormField(
215214
validator: FormBuilderValidators.compose([
216215
/// Makes this field required
217216
FormBuilderValidators.required(),
218-
217+
219218
/// Ensures the value entered is numeric - with a custom error message
220219
FormBuilderValidators.numeric(errorText: 'La edad debe ser numérica.'),
221-
220+
222221
/// Sets a maximum value of 70
223222
FormBuilderValidators.max(70),
224-
223+
225224
/// Include your own custom `FormFieldValidator` function, if you want
226225
/// Ensures positive values only. We could also have used `FormBuilderValidators.min(0)` instead
227226
(val) {
@@ -256,27 +255,27 @@ We welcome efforts to internationalize/localize the package by translating the d
256255

257256
1. Add ARB files
258257

259-
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`.
258+
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`.
260259

261260
2. Translate the error messages
262261

263-
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.
262+
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.
264263

265264
3. Generate localization code
266265

267-
To generate boilerplate code for localization, run the generate command inside the package directory where `pubspec.yaml` file is located:
266+
To generate boilerplate code for localization, run the generate command inside the package directory where `pubspec.yaml` file is located:
268267

269-
`flutter gen-l10n`
268+
`flutter gen-l10n`
270269

271-
The command will automatically create/update files inside the `lib/localization` directory, including your newly added locale support. The files in here are only necessary for local development and will not be committed to Github.
270+
The command will automatically create/update files inside the `lib/localization` directory, including your newly added locale support. The files in here are only necessary for local development and will not be committed to Github.
272271

273272
4. Update README
274273

275-
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!
274+
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!
276275

277276
5. Submit PR
278277

279-
Submit your PR and be of help to millions of developers all over the world!
278+
Submit your PR and be of help to millions of developers all over the world!
280279

281280
#### Add new validator
282281

0 commit comments

Comments
 (0)