Dropzonejs & Laravel - Output Form Validation Errors
I am trying to output form validation errors when you hover over the 'X' in the dropped off file in Dropzone. What I get: How can I make the object Object output the actual error
Solution 1:
I have fixed my issue.
To anyone who might have the same issue.
I fixed it by simply putting $('.dz-error-message').text(value);
Full code:
Dropzone.options.fileupload = {
maxFilesize: 50,
init: function () {
thisDropzone = this;
this.on("error", function (file, responseText) {
$.each(responseText, function (index, value) {
$('.dz-error-message').text(value);
});
});
}
};
Post a Comment for "Dropzonejs & Laravel - Output Form Validation Errors"