$.ajax({
type: "PUT",
url: url,
data: data,
dataType: 'json',
success: function(data) {
alert("success");
},
error: function(data) {
var errors = data.responseJSON;
console.log(errors);
}
})
});
the success event get triggered even though the post call fails (validation error), when does the error function get called?. what did i do wrong in that?
</div>