mirror of
https://github.com/cupcakearmy/formhero.git
synced 2024-12-22 16:16:24 +00:00
Update README.md
This commit is contained in:
parent
6b07497230
commit
891cd11d6c
21
README.md
21
README.md
@ -194,16 +194,17 @@ const validators = {
|
||||
|
||||
```javascript
|
||||
const validators = {
|
||||
username: [{
|
||||
validator: /^[A-z]*$/,
|
||||
message: 'My custom error message',
|
||||
},
|
||||
/[\d]/,
|
||||
async (value) => value.length > 0,
|
||||
{
|
||||
validator: (value) => true,
|
||||
message: 'Some other error',
|
||||
}
|
||||
username: [
|
||||
{
|
||||
validator: /^[A-z]*$/,
|
||||
message: 'My custom error message',
|
||||
},
|
||||
/[\d]/,
|
||||
async (value) => value.length > 0,
|
||||
{
|
||||
validator: (value) => true,
|
||||
message: 'Some other error',
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
|
Loading…
Reference in New Issue
Block a user