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

Regression between 15.0.0 and 15.2.1+ / 16.x.x

Open varadero opened this issue 2 years ago • 2 comments

🐞 bug report

Is this a regression?

Yes. It works in 15.0.0 but not in 15.2.1 and 16+

Description

  • Install version 15.0.0
  • Use mask="A*.AA"

It allows typing for example integer values (like 1, 10 or 100) and decimals with 1 digit before and after the point (like 1.2)

  • Install 15.2.1 or 16.x.x

It considers integer values (like 1, 10 or 100) as invalid and also decimals with 1 digit after the point (like 1.2)

varadero avatar Oct 18 '23 08:10 varadero

@varadero Hi. Could you provide stackblitz ?

andriikamaldinov1 avatar Nov 06 '23 14:11 andriikamaldinov1

Same errors for me. An input field set like this

 <input
          type="text"
          formControlName="quantity"
          mask="0*.00"
          [dropSpecialCharacters]="false"
      />

was working fine with version 16.0.2 and now is broken with version 16.3.4. Every field has class ng-invalid when loading a form with value already set in the control. After editing the field with the same value, the field is ng-valid

The problem occur when the initial value set in the control (patchValue) has more decimal than the mask allows (ex 1.2300)

marcpearson avatar Dec 15 '23 21:12 marcpearson

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

andriikamaldinov1 avatar Mar 28 '24 10:03 andriikamaldinov1

This issue has been locked due to inactivity. Please file a new issue by teamplate if you are encountering a similar or related problem.

andriikamaldinov1 avatar Mar 28 '24 10:03 andriikamaldinov1