Hey Guys, I am using ajax to send to post a form. I am using the $this->validate($request, [rules here]); which should return a JSON response if there is something that didn't validate correctly.
If I go to the network tab in Firefox debugger it shows me the response that laravel is throwing. Here is a picture:
error: function( data ){
var errors = data.responseJSON;
console.log(errors);
}
This is returning undefined in the console. Any ideas on what im doing wrong? I am using this on my site for something else and it works fine. The data.responseJSON seems to not be working right.
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community