backend requires all data to be in json string format. It used to be formatted with JSON.stringify (),.
when using the jquery-validation plug-in, the data can only be formatted with function return and cannot be formatted with JSON.stringify (). So how do you pass the json string back?
remote: {
url: "rest/user/checkphone",
type: "POST",
data: {
"phone": function () {
return $("-sharptxtLoginID").val();
}
},
dataType: "json",
async: false,
dataFilter: function (data) {
if (parseInt(data.userarea.result) == 0)
return true;
else
return false;
}
}
ask for advice. Thank you