v0.6.6
0.6.6 (2018-04-04)
Access to the original object in custom validator #5
const schema = {
email: {
type: "custom",
check(value, schema, stack, obj) {
return obj.username || obj.email ? null : this.makeError(...);
}
}
};