Update README.md

This commit is contained in:
Nicco 2019-09-28 19:19:48 +02:00 committed by GitHub
parent 6b07497230
commit 891cd11d6c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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',
}
]
}
```