jQuery validate : multiple form, single validation
<p>I have 2 forms, namely (ids mentioned) 'add_product' and 'edit_product'</p>

<p>Now I am using jQuery validation plug-in, both the forms have same validation (similar to mentioned in following example)</p>

<pre><code>jQuery("#add_product").validate({
    rules: {
        name:"required",
        price:"number"
    },
    messages: {
        name:"Please enter Plan Name",
        price:"Enter a valid number"
    }

});
</code></pre>

<p>and </p>

<pre><code>jQuery("#edit_product").validate({
    rules: {
        name:"required",
        price:"number"
    },
    messages: {
        name:"Please enter Plan Name",
        price:"Enter a valid number"
    }

});
</code></pre>

<p>I want to combine them into 1 rule/function, how can I achieve this?</p>

<p>Thanks</p>
