diff --git a/README.md b/README.md index 9845837..cb61cb7 100644 --- a/README.md +++ b/README.md @@ -189,3 +189,21 @@ const validators = { } } ``` + +###### Example: Multiple 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', + } + ] +} +```