Validación de jQuery en un subconjunto de campos

I am wanting to use jquery validation on one form that contains 2 submit buttons. each submit button submits its own set of fields. when i submit either of the submit buttons - jquery is validating both sets of fields.

Is there a way to setup the validation logic to handle its own set of fields on the one form?

this is how I have setup validation:

$(document).ready(function() {
    $("#form").validate({ errorElement: "div" });
});

margen:

<table>
<tr>
    <td>
        <label>Current Email Address</label><br />
        <label id="lblCurrentEmail" runat="server"></label><br /><br />                
        <label>New Email Address</label><br />
        <input id="txtNewEmail" name="txtNewEmail" type="text" /><br />
        <a id="btnUpdateEmail" class="roundButton" onclick="return updateEmail()">Update</a>
    </td>
    <td>
        <label>Update Password</label><br />
        <input id="txtNewPassword1" name="txtNewPassword1" type="password" /><br /><br />
        <label>Confirm Password</label><br />
        <input id="txtNewPassword2" name="txtNewPassword2" type="password" /><br />
        <a id="btnUpdatePassword" class="roundButton" onclick="return changePassword()">Update</a>
    </td>
</tr>
</table>

preguntado el 28 de agosto de 11 a las 02:08

that is completely dependant on how you have the validation logic setup currently.... which we can't see... -

hi, i have added some code above -

0 Respuestas

No es la respuesta que estás buscando? Examinar otras preguntas etiquetadas or haz tu propia pregunta.