I don't yet have a good idea of your setup, so just a quick idea:
// somewhere before the other stuff
var validationOptions = {};
// set page specifc options
$.extend(validationOptions, { ... });
// generated
$(...).validate(validationOptions);
That would work with and without page-specific
This should be a pretty good solution for what I need. Thanks Jörn!
On May 25, 7:54 am, Jörn Zaefferer [EMAIL PROTECTED]
wrote:
I don't yet have a good idea of your setup, so just a quick idea:
// somewhere before the other stuff
var validationOptions = {};
// set page specifc options
Trying to implement this now... Working off of what you said, is there
a way to do something like this?
var validationOptions = { rules: { name: { required: true } } };
$.extend(validationOptions, { rules: { email: { required: true } } });
And get a validationOptions with both? Or will I need
You can do a deep extend - its still undocumented, but stable since 1.2.6:
$.extend(true, validationOptions, { rules: { email: { required: true } } });
Jörn
On Sun, May 25, 2008 at 6:25 PM, Doug Mayer [EMAIL PROTECTED] wrote:
Trying to implement this now... Working off of what you said, is
This did the trick, exactly what I needed. Thanks!
On May 25, 12:22 pm, Jörn Zaefferer [EMAIL PROTECTED]
wrote:
You can do a deep extend - its still undocumented, but stable since 1.2.6:
$.extend(true, validationOptions, { rules: { email: { required: true } } });
Jörn
On Sun, May 25,
5 matches
Mail list logo