Well, the whole idea of masking the input is to validate it.  If you
want your user to be able to input 9_ and 09  and _9 and have them all
be valid, then you probably should use server side validation, or
maybe the validation plug-in.

Really, though, what you want to be accepted in the field isn't
validation, it's lack of validation.  Why not just put a 2-character
field and let them fill it in how they please and check to see if it
is a number between 1 and 12?

Regards,

Eric

On Jan 25, 11:24 am, Jason Levine <[EMAIL PROTECTED]> wrote:
> Is there any way to have aMaskedInputhave optional characters?  For
> example, if I have a month field, I would want to allow 01, 02, 03, etc, but
> also 1, 2, 3, etc.  If I define the mask as "99", then it blanks out the
> field if the leading zero isn't added.
>
> I even tried defining my own placeholder as:
>
> $.mask.addPlaceholder('@',"(1|2|3|4|5|6|7|8|9|0)?");
>
> But that still only matches 0-9 and not a "blank" character.
>
> Any ideas?
> --
> View this message in 
> context:http://www.nabble.com/Masked-Input-Optional-Characters-tp15091355s272...
> Sent from the jQuery General Discussion mailing list archive at Nabble.com.

Reply via email to