RobinHerbots / Inputmask

Input Mask plugin
https://robinherbots.github.io/Inputmask/
MIT License
6.4k stars 2.17k forks source link

Numeric mask with maxlenght #1652

Open mj-nico23 opened 7 years ago

mj-nico23 commented 7 years ago

First of all, thank you. This is awesome!!!

The problem is that you can't backspace after reaching the maximum number of characters.

https://jsfiddle.net/fncomtxr/

mike-wester commented 7 years ago

Try going with Decimal over numeric, seems to fix it:

https://jsfiddle.net/dfv6gL8v/1/

EDIT:

Sorry I think you actually need innerDigits: "integerDigits\":3,\"digits\":2, I think the issue is you're mixing validatons and they don't play well.

RobinHerbots commented 7 years ago

@mj-nico23 ,

Yes I see. I will solve this at a later point. You can work around it by specifying a maximum or defining integerdigits and digits to limit the number.

The solution to implement would be to calculate these properties based on the given maxlength