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

fix custom drop special characters on validation #1236

Closed kryshac closed 1 year ago

kryshac commented 1 year ago

PR Checklist

Please check if your PR fulfills the following requirements:

PR Type

What kind of change does this PR introduce?

What is the current behavior?

when drop special characters is different from special characters the validation does not always work

example mask: +000 specialCharacters: ['+', ' '] dorpSpecialCharacters: [' '] value: +37

when the validation is done, it checks if dropSpecialCharacters is set, but when removing the characters from the value, it removed those from specialCharacters, and therefore the validation was not correct

Issue Number: N/A

What is the new behavior?

Does this PR introduce a breaking change?

Other information