JsDaddy / ngx-mask

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

Browser validation is not triggered when we have mask directive set, even if the mask does not have value #1379

Open burcalidiagabriela opened 4 days ago

burcalidiagabriela commented 4 days ago

🐞 bug report

Is this a regression?

No

Description

Browser validation is not triggered when we have mask directive set on an input. I created an example with one input with mask set, one with mask empty, one input with mask directive without value and one without mask. All contain the classic minlength validation. It can be seen that if we write 2 characters in the input and press submit, only the simple input contains the error popup from the browser. image

🔬 Minimal Reproduction

https://stackblitz.com/edit/cbohpi-ye2vvv?file=src%2Fexample%2Fbutton-overview-example.html

🌍 Your Environment

Angular: 17.0.0
ngx-mask: 16.4.2