class-validator
Version:
Decorator-based property validation for classes.
6 lines (5 loc) • 307 B
TypeScript
import { ValidationOptions } from '../ValidationOptions';
/**
* Ignores the other validators on a property when the provided condition function returns false.
*/
export declare function ValidateIf(condition: (object: any, value: any) => boolean, validationOptions?: ValidationOptions): PropertyDecorator;