JsDaddy / ngx-mask

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

Inputs without [dropSpecialCharacters] and width [dropSpecialCharacters]="false" #1302

Closed v-skochko closed 6 months ago

v-skochko commented 8 months ago

🐞 bug report

Is this a regression?

Yes, the previous version in which this bug was not present was: 14.2.3 ### Description Validation for the form control operates differently based on the [dropSpecialCharacters] input. If dropSpecialCharacters is set to false, the control will be invalid. If we remove dropSpecialCharacters from the control, the same value will be valid. ### Expected behavior Controls with [dropSpecialCharacters]="false" and controls without [dropSpecialCharacters] should be validated in the same way. ## 🔬 Minimal Reproduction https://stackblitz.com/edit/stackblitz-starters-grq66u?file=src%2Fmain.ts

🔥 Exception or Error

errors: {
    mask: {
        actualValue: '0000000000';
        requiredMask: '(000) 000-0000';
    };
};

🌍 Your Environment

Angular Version:

    "@angular/animations": "16.2.11",
    "@angular/common": "16.2.11",
    "@angular/compiler": "16.2.11",
    "@angular/core": "16.2.11",
    "@angular/forms": "16.2.11",
    "@angular/platform-browser": "16.2.11",
    "@angular/platform-browser-dynamic": "16.2.11",
    "@angular/router": "16.2.11",
    "@types/jasmine": "4.0.3",
    "ngx-mask": "^17.0.1",
    "rxjs": "7.8.1",
    "tslib": "2.6.2",
    "zone.js": "0.13.3"




andriikamaldinov1 commented 6 months ago

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