JsDaddy / ngx-mask

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

Have max length checking for input #1327

Closed joshuaGnol closed 7 months ago

joshuaGnol commented 8 months ago

🚀 feature request

Description

Allow to calculate the max length without calculating the thousand separator

<input mask="separator.2" thousandSeparator="," maxlength="10">

max length = 10 current only allow 8 number input : 123,456.78 as it include the separator , and dot .

Describe the solution you'd like

Can we have a max length checking to allow number of input without the separator and dot, and option to exclude the max-length from the decimal.

eg: maxLengthInput= "10" allow input : 1,234,567,890.99

Describe alternatives you've considered

Have you considered any alternative solutions or workarounds?
joshuaGnol commented 7 months ago

Found separatorLimit where we can set separatorLimit="'9999999999'" for max 10 length. Would be good to add it to the documentation.

andriikamaldinov1 commented 7 months ago

@joshuaGnol Thanks for using Ngx-mask. If you have any problems or questions in the future,open new issue by teamplate.