[Seaside] JavaScript input mask/validator

Esteban A. Maringolo emaringolo at gmail.com
Thu Jan 31 14:25:02 UTC 2008


Hi,

On Jan 31, 2008 11:12 AM, cdrick <cdrick65 at gmail.com> wrote:
> validation could be done with scriptaculous and/or magritte + CSS I think...

Validation could work that way, but masking input not.
Validation could be done "per field" and masking must be done by char/keystroke.

The model will validate the field, but for some kind of users, having
a predefined input "shape" is better than having an empty text entry.
As sooner the feedback, less time is lost, and the user can do more stuff.

> For masks, I don't really see. It's about cancelling the last keyboard
> entry if not compatible with the format provided ?

No, it can get more complicated if you have to deal with different
decimal separators, or a fixed size of decimal places, an ISBN code,
or any other arbitrary input.

I'm not speaking in the air, by now I only need a float input
validator, char-by-char if possible, if not, I can make my own with JS
and RegEx, but I'm looking for something more comprehensive.

Best regards,

-- 
Esteban A. Maringolo
eMaringolo at gmail.com


More information about the seaside mailing list