<form>
<input type="submit" name="submit" id="formSubmit" value="SAVE FOR NOW" />
<input type="submit" name="submitAndConfirm" id="submitAndConfirm" value="CONFIRM AND UPLOAD TO SERVER" />
</form>
$(document).ready(function(){
$('#addPat').submit();
$('#submitAndConfirm').click(function(){
$('#addPat').validate({
rules:{
iscosId:{required:true},
pat_id:{required:true},
admissionDate:{required:true},
dischargePlace:{required:true}
},messages:{
iscosId:"Please reload the Page",
pat_id:"This field cannot be empty",
admissionDate:"This field cannot be empty",
dischargePlace:"This field cannot be empty"
}
});
});
});
What I want is; when I submit the formSubmit
button I want form to not validate, but when I click submitAndConfirm button I want validate the form to be validated.