मैं केवल यह सुझाव दे रहा हूँ अगर आप 4 लाइनों
//untested but you'll get the gist, you may need a slight variation on this
$("#step1").wrap('<form id="tmp-form"></form>');
$("#tmp-form").validate();
$("#step1").insertBefore("#tmp-form");
$("#tmp-form").remove();
मूल विचार एक अस्थायी रूप में लपेट के लिए है में एक त्वरित हैक साथ ठीक हैं। वैधता सुनिश्चित करें। हटाना। दोहराएँ।
Benefits:
use a validation plugin you already know and is well-tested.
you don't need to change any existing validation rules
Cons:
possible undesired layout effects depending on you style markup
maybe others? once again, not tested just a quick thought
स्रोत
2009-06-26 02:19:17