Closed miszol1 closed 1 year ago
@miszol1 Thanks for using Ngx-mask. Please update to latest version.
It example all work as expected - https://stackblitz.com/edit/angular-6mfphe?file=src%2Fmain.ts
@andriikamaldinov1 Wouldn't the opposite behavior be correct? Why can't we type a leading zero without the value being "pushed"? Think about the case where the user wants to edit a value that was previously 45 to 0.45. They simply won't make it.
@lucasousi Yes but if you start typing 0 without . the value is invalid -045
@lucasousi Yes but if you start typing 0 without . the value is invalid -045
I opened a thread to discuss this behavior: #1240
🐞 bug report
Description
allowNegativeNumbers combined with separator allows to type multiple zeros at the beginning of value. This behavior does not exists when allowNegativeNumbers = false.
Examples: allowNegativeNumbers = false You can't type 0004.
allowNegativeNumbers = true You can type -0004
🔬 Minimal Reproduction
https://stackblitz.com/edit/angular-n1a9gc?file=package.json,src%2Findex.html,src%2Fmain.ts
🌍 Your Environment
Angular Version: