validation could be done with scriptaculous and/or magritte + CSS I think... For masks, I don't really see. It's about cancelling the last keyboard entry if not compatible with the format provided ?