Skip to content
Advertisement

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:

enter image description here

How can I make the object Object output the actual error message from the form validation? I can alert the error message but can’t actually show the error message upon hovering over the x.

My js file:

JavaScript

My controller:

JavaScript

Advertisement

Answer

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:

JavaScript
User contributions licensed under: CC BY-SA
3 People found this is helpful
Advertisement