JsDaddy / ngx-mask

Angular Plugin to make masks on form fields and html elements.
https://jsdaddy.github.io/ngx-mask
MIT License
1.16k stars 300 forks source link

Using showTypedMask option causes form control to be invalid even if one of mask is fulfilled #1276

Closed Ihuarraquax closed 11 months ago

Ihuarraquax commented 12 months ago

🐞 bug report

Is this a regression?

Do not know

Description

Using showTypedMask option causes form control to be invalid even if one of mask is valid. Check screen and stackblitz

image

🔬 Minimal Reproduction

https://stackblitz.com/edit/angular-f3qfph?file=src%2Fmain.ts

  1. Open stackblitz
  2. Type 5 digits in both inputs
  3. See validation error

🔥 Exception or Error

form control validation error: { "mask": { "requiredMask": "00000-0000", "actualValue": "12324" } }

🌍 Your Environment

Angular Version:

angular 16 ngx-mask 16.4.1

Anything else relevant?

andriikamaldinov1 commented 11 months ago

@Ihuarraquax Thanks for using Ngx-mask. Please update to latest version. It example all work as expected - https://stackblitz.com/edit/angular-gvb8nk?file=src%2Fmain.ts