This repository was archived by the owner on Feb 19, 2026. It is now read-only.
馃巵 Validate anything in context
Use the getContext and setContext methods to validate anything in context. 馃槑
const options = {
convert: true,
getContext(context) {
return context.params.query;
},
setContext(context, newValues) {
Object.assign(context.params.query, newValues);
},
}
const hooks = {
before: {
get: [
validate.form(schema, options)
]
}
}