error
error(message, [ctx])
Effect
How To Use
Arguments
Example
const schema = racoon
.string()
.error('Name should be a type of string')
.required()
.error('Name is required');
schema.validate(1); // fail, error message is 'Name should be a type of string'
schema.validate(null); // fail, error message is 'Name is required'Last updated