jQuery-Mask-Plugin icon indicating copy to clipboard operation
jQuery-Mask-Plugin copied to clipboard

Value trims on pasting iban number into input field.

Open Faizan-Shakeel opened this issue 6 years ago • 2 comments

Pattern I need in an input field: ("SS00 0000 0000 0000 0000 00"); Example: DE00 0000 0000 0000 0000 00

Copy pasted values are trimmed if longer than the above pattern because of having more than one space in between. Example value to reproduce the unwanted behavior: DE00 0000 0000 0000 0000 00

Any possible solution please?

Faizan-Shakeel avatar May 14 '19 10:05 Faizan-Shakeel

You can use this: http://igorescobar.github.io/jQuery-Mask-Plugin/docs.html#mask-as-a-function

And remove spaces from the string before applying the mask. It would solve your issue.

igorescobar avatar May 14 '19 10:05 igorescobar

thanks a lot, I will try that.

Faizan-Shakeel avatar May 14 '19 14:05 Faizan-Shakeel