Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
return {
validate: (fields, fn) => {
try {
fn(null, validator(fields));
} catch (e) {
fn(e);
}
},
};
}
let open = this.app.config.validator.open;
if (R.type(open) === 'Function' || R.type(open) === 'AsyncFunction') {
open = await open(this);
}
const messages = this.app.config.validator.languages[open] || {};
const validator = new Validate(config);
validator.messages(messages);
return validator;
},
async verify(path, type) {