I'm using this ajax request to send request using jQuery:
$.ajax({type: 'POST',
url: '/send-review',
data: {
"_token": "{{ csrf_token() }}",
"_id": {{$item->id}},
},
success: function (data) {
console.log(data);
},
error: function (err) {if (err.status == 422) {
// when status code is 422, it's a validation issue
}
}
});
I can show get Laravel validation error in the bottom of each input, but how can I show all of the Laravel validation errors format in one box of HTML using jQuery?