Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
960
Why does maskeditor PAD with spaces and insert spaces in value if user clicks in the middle of the field??
posted

Hello,

I am using an IGMaskeditor for a USERID entry field so that the userid is folded to uppercase as the user types and I've noticed 2 bugs in the maskeditor.

    $("#maskEditor").igMaskEditor({
                inputMask: '>Aaaaaaaaaaaaaaaa'
    });

1) When I query the VALUE of the field, IG is padding the value with spaces at the end. Clearly the mask has those chars as NOT REQUIRED and NO spaces are allowed, so why is the value padded with spaces??

2) Also the mask defines that the space character is NOT allowed. While I can not actually type a space char, if I click into the middle of the entry field, it effectively creates spaces in the value.

My requirement for a userid entry is pretty simple : 1-18 chars, no spaces, upper case. How can I get MaskEditor to do this?

Please see this fiddle for my simple example : http://jsfiddle.net/54t8u8eL/

Thank you.