diff --git a/projects/cdk/directives/native-validator/native-validator.directive.ts b/projects/cdk/directives/native-validator/native-validator.directive.ts index b8274808bca5..e92a636dfcb2 100644 --- a/projects/cdk/directives/native-validator/native-validator.directive.ts +++ b/projects/cdk/directives/native-validator/native-validator.directive.ts @@ -38,7 +38,7 @@ export class TuiNativeValidatorDirective implements Validator { @HostListener('blur') protected handleValidation(): void { - this.el.setCustomValidity( + this.el.setCustomValidity?.( this.control?.touched && this.control?.invalid ? this.tuiNativeValidator : '', ); }