checkmate
Checkmate is a very simple data validator.
Use cases
- form input validation
- model validation
Characteristics
- no dependency
- framework / lib / context agnostic: describe what you expect → send an object → get errors
- does not come with validation functions, write your own or combine with libraries such as
is.js
Example
See the react + is_js
example.
const checkers = const errors = console // → { email: ['isEmail'], password: ['truthy'] }