[jQuery] Validation Plugin: Possible to split rules across multiple pages
So i have a web form, which contains 2 sub-forms.. basically the 2 sub
forms are user controls, with form elements, and their own validation
rules.
The sub forms are reused on various pages, and so need their
validation rules to carry through to these pages.
is there a way to apply rules to a form's "validate()" function
without declaring them within the validate() function?
So instead of of this:
$().ready(function()
{ $("#Short").validate({
rules: {...}
});
I'd like to be able to do something along the lines of:
$().ready(function()
{ $("#Short").validate({
rules: {...}
});
$("#Short").rules.add (...)
thjat way i can declare the overall rules along with the Validate()
function call, and add extra validation rules via the user controls,
keeping the form more modular. Is this possible at all?
Any suggestions as to how I might achieve this (preferably with the
Validation Plugin)?
thanks heaps
Greg