Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
export function setValidators(control: AbstractControl, validator: ValidatorFn | ValidatorFn[] | null) {
control.setValidators(coerceArray(validator));
control.updateValueAndValidity();
}
export function setAsyncValidators(control: AbstractControl, validator: AsyncValidatorFn | AsyncValidatorFn[] | null) {
control.setValidators(coerceArray(validator));
control.updateValueAndValidity();
}