-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Incorrect behavior on pre-filled inputs, using array of masks. #2799
Comments
Can you provide some examples of your Inputmask configuration? |
I have a JsFiddle on my post. Just using an array of masks on fields with values is enough. |
Ah, I see now. Anyway, you should set values of your inputs without mask characters, i.e. not |
But the one with a single mask works just fine |
I'm not completely sure what's the intended behavior. Maybe it should handle values in the masked format. But usually, we want to store data without mask characters, because mask can format change or it's in a completely different format, e.g. some countries write their numbers like |
JsFiddle of the situation
On pre-filled inputs, when using an array of masks, the plugin doesn't seem to be working correctly. With removeMaskOnSubmit = true, the value submitted still has (some of) the mask. If the field has optional characters, on the field with less than full characters filled, I can't type an additional one (first field of JsFiddle, the masks accept 10 or 11 characters, but on the one with 10 I can't add one more).
If I delete all characters of the field, the masks start working correctly again.
Windows 10 22H2
Firefox 127.0.2
Chrome 126.0.6478.127
5.0.9
The text was updated successfully, but these errors were encountered: