2
我想输出表单验证错误,当您将鼠标悬停在Dropzone的Dropoff文件中的“X”时。DropzoneJS&Laravel - 输出表单验证错误
我得到什么:
我怎样才能让object Object
输出表单验证实际的错误信息?我可以提醒错误消息,但实际上不能在悬停在x上时显示错误消息。
我的js文件:
Dropzone.options.fileupload = {
maxFilesize: 20,
init: function() {
thisDropzone = this;
this.on("error", function (file, responseText) {
$.each(responseText, function (index, value) {
alert(value); //this shows the alert of the error message
});
});
}
};
我的控制器:
$this->validate($request, [
'file' => 'max:20000',
]);