Skip to content
Advertisement

Uploading image from input field and still getting validation error saying that field is required

Route Code:

JavaScript

The Form I’m Using to Upload the File:

JavaScript

Controller Code:

JavaScript

Request file validation:

JavaScript

The error I get when trying to save after selecting an Image: enter image description here

Trying to figure out what I’ve done wrong for hours and am so frustrated right now, please help me to resolve this issue. Thanks in advance.

Advertisement

Answer

Field in form is named gallery_img so that name has to be checked:

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