Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
getValidator(name: string): Validator {
const validator = validation.getValidator(name);
if (!validator) {
throw new ValidationError("Validator `" + name + "` does not exist!", name);
}
return validator;
}