Skip to content

Commit 3520158

Browse files
committed
fix: readme file
1 parent 4b23e5b commit 3520158

File tree

1 file changed

+24
-25
lines changed

1 file changed

+24
-25
lines changed

README.md

Lines changed: 24 additions & 25 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)
@@ -157,8 +156,8 @@ Validators support default `errorText` messages in these languages:
157156
- Indonesian (id)
158157
- Italian (it)
159158
- Japanese (ja)
160-
- Korean (ko)
161159
- Kurdish (ku)
160+
- Korean (ko)
162161
- Khmer (km)
163162
- Lao (lo)
164163
- Malay (ms)
@@ -234,13 +233,13 @@ TextFormField(
234233
validator: FormBuilderValidators.compose([
235234
/// Makes this field required
236235
FormBuilderValidators.required(),
237-
236+
238237
/// Ensures the value entered is numeric - with a custom error message
239238
FormBuilderValidators.numeric(errorText: 'La edad debe ser numérica.'),
240-
239+
241240
/// Sets a maximum value of 70
242241
FormBuilderValidators.max(70),
243-
242+
244243
/// Include your own custom `FormFieldValidator` function, if you want
245244
/// Ensures positive values only. We could also have used `FormBuilderValidators.min(0)` instead
246245
(val) {
@@ -275,27 +274,27 @@ We welcome efforts to internationalize/localize the package by translating the d
275274

276275
1. Add ARB files
277276

278-
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`.
277+
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`.
279278

280279
2. Translate the error messages
281280

282-
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.
281+
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.
283282

284283
3. Generate localization code
285284

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

288-
`flutter gen-l10n`
287+
`flutter gen-l10n`
289288

290-
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.
289+
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.
291290

292291
4. Update README
293292

294-
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!
293+
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!
295294

296295
5. Submit PR
297296

298-
Submit your PR and be of help to millions of developers all over the world!
297+
Submit your PR and be of help to millions of developers all over the world!
299298

300299
#### Add new validator
301300

@@ -328,4 +327,4 @@ Take a look at [our fantastic ecosystem](https://github.com/flutter-form-builder
328327

329328
## Thanks to
330329

331-
[All contributors](https://github.com/flutter-form-builder-ecosystem/form_builder_validators/graphs/contributors)
330+
[All contributors](https://github.com/flutter-form-builder-ecosystem/form_builder_validators/graphs/contributors)

0 commit comments

Comments
 (0)