Ⓙⓐⓚⓔ schrieb: > for the jQ soultuon : > 1 class to mention which plugin will handle the validations > 1 or more other classes as defined in that plugin > we bind early on all fields that have the 'plugin' class, then we can > easily handle flipping from US-phone-number to UK-phone-number.. etc! > > how the formats are defined is...... pure jQ magic! functions, > regexps, whatever!!! > > This is sorely needed.... I am tired of doing it 'my way', I look > forward to doing it the jQ way. > Well, I think I covered that, too. You need a special number format? Define it as a new validation rule and apply it to your form, that's it.
// returns true, if the value does not match the pattern jQuery.validator.rules.myNumberFormat = function(value) { return !value.match(/\d\d\d-\d\d/); // change regex to whatever you need }; Is this what you had in mind? -- Jörn _______________________________________________ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/