adonis-validator-extended
v1.0.3
Published
Adonis extended validator
Downloads
70
Readme
adonis-validator-extended
A beta implementation for adonis extended validation.
Usage
class StoreUser {
get rules () {
return {
email: 'disposable', // located at config/disposable.js
password: 'complexity', // regex used is ^(?=.*[A-z])(?=.*[A-Z])(?=.*[0-9])(?=.*[$@])(?!.*[iIoO])\S{6,12}$
mobile: 'mobile', // A valid mobile number for PH country only
photo: 'uploadcare', // A valid uploadcare URL (https://ucarecdn.com/f5c9b284-82d1-4e24-86a7-8d6b11907654)
}
}
}
Roadmap
- Database exists
- Generic phone numbers
- Generic mobile numbers
- Dynamic regex via args