@ -40,9 +40,11 @@ module.exports.compose = function composeValidators(validators) {
}else{
thrownewError(`The 'errors' in a validationResult must be an array`);
}
}elseif(resultinstanceofError){
// We could interpret returned Errors as either values or a throw substitute. Let's wait for users to file issues, so that we know what people *actually* need here.
thrownewError(`It is currently not allowed to return an Error object from a validator. If you have a reason to need this, please file a bug!`);