You could start by writing custom methods for each of these input types, and where possible, delegate to the existing methods: http://docs.jquery.com/Plugins/Validation/Validator/addMethod
What do you think? Jörn On Mon, Jul 27, 2009 at 8:42 PM, Brett Ritter<swift...@swiftone.org> wrote: > > I considering input rewriting (transformation, conversion, etc, use > the verb of your choice) to be an essential part of validation. > > This means phone numbers, SSN, dates, credit card numbers, etc should > all accept "loose" input types and should be standardized for backend > processing. > (Personal Pet Peeve - sites that instruct you not to use spaces or > hyphens in credit card numbers) > > This article makes the general case: > > http://www.hising.net/2007/03/30/form-validation-with-javascript/ > > The article for the popular validation plugin notes the above article, > but doesn't offer code for this particular point (See #6): > > http://bassistance.de/2007/07/04/about-client-side-form-validation-and-frameworks/ > > It does point out the masked input plugin, but my goal is not to > provide hints to the user on how to take additional effort but rather > to save them effort in the first place. > > Both of these articles date from 2 years ago. Googling for existing > plugins has not led me to happiness. I'll happily write my own plugin > if it is not reinventing the wheel, but I'd love to have some > compatibility with the validate plugin. > Does anyone have suggestions for the best approach for doing so? The > transformation can be done front-end (i.e. visible to the user, > changing the value in the inputs) or internally (standardizing the > values sent to the validate plugin), I'm not picky as to which just > yet. > > -- > Brett Ritter / SwiftOne > swift...@swiftone.org >