File tree Expand file tree Collapse file tree 1 file changed +4
-6
lines changed Expand file tree Collapse file tree 1 file changed +4
-6
lines changed Original file line number Diff line number Diff line change @@ -57,12 +57,10 @@ export default ({ error, ...props }) => {
57
57
58
58
You can see a list of rules [ here] ( https://github.com/skaterdav85/validatorjs#available-rules )
59
59
60
- ` Form ` accepts a few more props for those that need to customize things.
61
-
62
60
** errorMessages**
63
61
64
62
Custom error messages. You can see how these work [ here] ( https://github.com/skaterdav85/validatorjs#custom-error-messages )
65
- ```
63
+ ``` js
66
64
errorMessages= {{
67
65
' required.email' : ' Custom error message' ,
68
66
' min.password' : ' Custom min password required error message.'
@@ -72,14 +70,14 @@ errorMessages={{
72
70
** initialValues**
73
71
74
72
Set values when the form is first rendered.
75
- ```
73
+ ``` js
76
74
initialValues= {{name: ' set' }}
77
75
```
78
76
79
77
** errors**
80
78
81
79
Set errors manually, in case the server comes back with messages.
82
80
83
- ```
84
- initialValues ={{name: 'set '}}
81
+ ``` js
82
+ errors = {{name: ' Email is invalid... ' }}
85
83
```
You can’t perform that action at this time.
0 commit comments