I am using following code to save items in sharepoint.
$().SPServices({
operation: "UpdateListItems",
async: false,
batchCmd: "New",
listName: "Share Point List",
valuepairs: [["Title", fnameVal], ["LastName", lnameVal], ["Gender0", genderVal], ["DateOfBirth", birthDateVal], ["Email0", emailVal], ["City", cityVal], ["Country", countryVal]],
completefunc: function (xData, Status) {
alert("Data Saved! and Please check your List");
}
});
It works perfectly when data is saved but when it don't save for some validation I still get the alert message. How can I check if validation failed and for which fields validation failed?