In the voyager backend, i set an image field as required in the BREAD section:
This works well in 'add' mode. image field will be validated if empty
Issue occurs in 'edit' mode. The image appears but on clicking on 'save', a prompt is thrown indicating the image field is empty(therefore requiring the image to be uploaded again):
therefore getting an 'Image field is required' prompt on edit. this appears to be a bug. Anyone experienced this issue and how did you fix it?
Found a solution from the ticket i had raised on Voyager's github's page:
i.e. using required_if
instead of required
{ "validation": { "rule": "required_if:id,null", "messages": { "required": "your message" } } }
here's the ticket: Voyager image edit issue