[jQuery] Validating / Masking variable length inputs. Price,Weight etc...
Hi,
I've been looking around for a while for a simple and fast solution to
input field masking with optional lengths, for instance to mask a
'price' field.
I want to be able to offer the following mask (where ^ means no limit
to the length of the following characters):
^9.99
So then the input could be 15315.12 or 1.5 but it would mask the input
correctly, or at least validate it on blur or something nice like
that :).
Same with things like weight, the mask would want to be something like
^9.^9 so that it could be 2.3256kg or 0.535
I guess, however there would need to be set a minimum length (1 I
guess), so that it would validate / mask it to 0.535kg or £1.50 (if .
535 and 1.5 were entered).
I've previously used digitalBrush's Masked Input Plugin, and it's
great, but it forces you to have a field a certain length as far as I
know.
Does anyone know a modification to this plugin I could make to achieve
the results I'm looking for?