klay
Isomorphic and extensible validation library for JavaScript.
API Documentation
Usage
Install
npm install --save klay
Validate
const klay = defaultModelContext const myModel = klay object const results = myModel console
value: firstName: 'John' lastName: '42' email: 'invalid.com' age: 'eleven' conforms: false errors: message: 'expected value (invalid.com) to be email' path: 'email' message: 'expected value (eleven) to have typeof number' path: 'age'
Extend
const klay = defaultModelContext klay const myModel = klay object