ngx-mask icon indicating copy to clipboard operation
ngx-mask copied to clipboard

FormControl, if setValue is used it loses form validations

Open desarrollo-grupo-adec opened this issue 4 years ago • 1 comments

If a reactive form is used, there is no problem, but if the reactive form is called the setValue function, the input with the mask loses validation, currently I use Validators.required, Validators.maxLength (13), Validators.minLength (13 )

Identificacion: [{ value: '', disabled: false }, [Validators.required, Validators.maxLength(13), Validators.minLength(13)]]

html <input type="text" class="form-control" id="Identificacion" formControlName="Identificacion" mask="0000-0000-00000" [showMaskTyped]="true">

desarrollo-grupo-adec avatar Mar 15 '21 17:03 desarrollo-grupo-adec

Did you manage to solve it?

MatheusOliveira-dev avatar Mar 02 '22 19:03 MatheusOliveira-dev

@desarrollo-grupo-adec Thanks for your using Ngx-Mask. Please update to latest version. It example, all work as expected - https://stackblitz.com/edit/angular-u13nuo?file=src%2Fmain.ts

andriikamaldinov1 avatar Jun 20 '23 12:06 andriikamaldinov1