@coxy/react-validator 2.0.0 → 2.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/README.md +15 -15
  3. package/package.json +1 -1
package/CHANGELOG.md CHANGED
@@ -1,3 +1,9 @@
1
+ 2.0.1 / 2022-06-12
2
+ ==================
3
+ * Typescript version
4
+ * Update dependencies
5
+
6
+
1
7
  1.3.0 / 2020-11-10
2
8
  ==================
3
9
  * Update dependencies
package/README.md CHANGED
@@ -24,7 +24,7 @@ See more examples [here](example/example.jsx)
24
24
 
25
25
  ```jsx
26
26
  import React, { useState } from 'react';
27
- import ValidatorWrapper, { rules, ValidatorField } from '@coxy/react-validator';
27
+ import { ValidatorWrapper, rules, ValidatorField } from '@coxy/react-validator';
28
28
 
29
29
  const validator = React.createRef();
30
30
 
@@ -105,21 +105,20 @@ This component has a default set of rules that you can use right away:
105
105
 
106
106
  #### ValidatorWrapper props
107
107
 
108
- **name** | **default** | **required** | **description**
109
- ------------------|-------------|--------------|--------------------------------------------------------
110
- ref | null | no | React\.ref or useRef
111
- stopAtFirstError | false | no | The validator will stop checking after the first error
112
-
108
+ | **name** | **default** | **required** | **description** |
109
+ |------------------|-------------|--------------|--------------------------------------------------------|
110
+ | ref | null | no | React\.ref or useRef |
111
+ | stopAtFirstError | false | no | The validator will stop checking after the first error |
113
112
 
114
113
   
115
114
  #### ValidatorField props
116
115
 
117
- ****name**** | ****default**** | ****required**** | **description**
118
- --------------|-----------------|------------------|-------------------------------
119
- value | undefined | yes | Value for validation
120
- rules | \[\] | yes | Array of rules for validation
121
- required | true | no | The field will be required
122
- id | null | no | ID for get field
116
+ | ****name**** | ****default**** | ****required**** | **description** |
117
+ |--------------|-----------------|------------------|-------------------------------|
118
+ | value | undefined | yes | Value for validation |
119
+ | rules | \[\] | yes | Array of rules for validation |
120
+ | required | true | no | The field will be required |
121
+ | id | null | no | ID for get field |
123
122
 
124
123
   
125
124
  # React api useValidator
@@ -136,9 +135,10 @@ console.log(isValid, errors) // false
136
135
 
137
136
  #### Validator constructor parameters
138
137
 
139
- **name** | **default** | **required** | **description**
140
- ------------------|-------------|--------------|--------------------------------------------------------
141
- stopAtFirstError | false | no | The validator will stop checking after the first error
138
+ | **name** | **default** | **required** | **description** |
139
+ |------------------|-------------|--------------|--------------------------------------------------------|
140
+ | stopAtFirstError | false | no | The validator will stop checking after the first error |
141
+
142
142
   
143
143
  #### Validator.addField()
144
144
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@coxy/react-validator",
3
- "version": "2.0.0",
3
+ "version": "2.0.1",
4
4
  "description": "🚀 Simple validation form for React or NodeJS apps. useValidator are included ;)",
5
5
  "main": "./dist/index.js",
6
6
  "repository": {