koa-validator
koa-validator copied to clipboard
Custom messages for each validation check
koa-validate
and express-validator
(which are built on top of validator
) support custom messages for every check. For example -
this.checkBody('nameFirst', 'Invalid first name').isAlpha('Name can contain only alphabets').isLength(1, 20, 'First name must be at least 1 character');
koa-validator
just returns the default message.
Sorry, now days I have no time to work on this. PRs are welcome
wanted!!!