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
- A custom attribute `data-async` introduced to denotes async validation form field.
24
+
It should be mentioned in form field, if the form field has async validation. Refer [`registerAsync`](https://gokulakannant.github.io/react-form-input-validation/v2.0.0/classes/reactforminputvalidation.html#registerasync) API for more details.
25
+
26
+
### Modified
27
+
28
+
- API Documentation contents has improved.
29
+
- More Code Sandbox examples are added in the API document.
30
+
- Modified API name from `handleFieldsChange` to [`handleChangeEvent`](https://gokulakannant.github.io/react-form-input-validation/v2.0.0/classes/reactforminputvalidation.html#handlechangeevent).
31
+
- Error message containing state `inputErrors` is renamed to `errors`.
32
+
- Accessing error message in state is modified from `state.inputErrors.{form field name}.message` to `state.errors.{form field name}`.
- Rules passing in consturctor is removed. And the alternate is [`useRules`](https://gokulakannant.github.io/react-form-input-validation/v2.0.0/classes/reactforminputvalidation.html#userules).
38
+
- Handle submit callback in constructor removed. And the alternate is [`onformsubmit`](https://gokulakannant.github.io/react-form-input-validation/v2.0.0/classes/reactforminputvalidation.html#onformsubmit) event.
A customized [validatorjs](https://www.npmjs.com/package/validatorjs) library to validate the react forms.
7
+
A customized [validatorjs](https://www.npmjs.com/package/validatorjs) library to validate the react forms. It uses the [Controlled Components](https://reactjs.org/docs/forms.html#controlled-components) approach for validation.
7
8
8
9
*[Supported Rules](https://www.npmjs.com/package/validatorjs#available-rules) (It is supports all validatorjs rules)
*[Demo](https://codesandbox.io/s/react-form-input-validation-demp-hyuju?fontsize=14&hidenavigation=1&theme=dark) (in CodeSandbox)
11
12
12
13
## Why use react-form-input-validation?
@@ -17,13 +18,29 @@ A customized [validatorjs](https://www.npmjs.com/package/validatorjs) library to
17
18
* Readable and declarative validation rules which is inspired by laravel framework.
18
19
* Error messages with multilingual support.
19
20
21
+
## Installation
22
+
23
+
To install the stable version:
24
+
25
+
Using [npm](https://www.npmjs.com/) as your package manager.
26
+
27
+
```bash
28
+
npm install --save react-form-input-validation
29
+
```
30
+
31
+
Using [yarn](https://yarnpkg.com/en/) as your package manager.
32
+
33
+
```bash
34
+
yarn add react-form-input-validation
35
+
```
36
+
20
37
## Usage
21
38
22
-
A example form has given below. View all available apis in [documentation](https://gokulakannant.github.io/react-form-input-validation/classes/reactformvalidator.html).
39
+
A example form has given below. View all available apis in [documentation](https://gokulakannant.github.io/react-form-input-validation/v2.0.0/index.html).
React Form Input Validation follows [Semantic Versioning 2.0.0](https://semver.org/spec/v2.0.0.html). React Form Input Validation version numbers have three parts: major.minor.patch. The version number is incremented based on the level of change included in the release.
17
+
18
+
***Major releases** contain significant new features, some but minimal developer assistance is expected during the update. When updating to a new major release, you may need to run update scripts, refactor code, run additional tests, and learn new APIs.
19
+
***Minor releases** contain important new features. Minor releases are fully backward-compatible; no developer assistance is expected during update, but you can optionally modify your apps and libraries to begin using new APIs, features, and capabilities that were added in the release.
20
+
***Patch releases** are low risk, contain bug fixes and small new features. No developer assistance is expected during update.
0 commit comments