ngx-mask
ngx-mask copied to clipboard
FormControl, if setValue is used it loses form validations
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">
Did you manage to solve it?
@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