How to check if validation fails while saving data

Nov 16, 2014 at 11:37 AM
I am using following code to save items in sharepoint.

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?
Nov 16, 2014 at 2:48 PM
Your answer is in this SPServices forum post: