Version information
Description
Image field in edit mode still asking for image as a 'required' field.
Steps To Reproduce
1.Making image fields as 'required' using below JSON in the BREAD section
{ "validation": { "rule": "required" } }
works well in add mode.


Expected behavior
The image already exists and should therefore not get the 'The Image field is required.' prompt on edit
anyone?
I believe this is a known issue that hasn't been fixed yet. I haven't had a chance to look, but I'm certain there's at least one open issue for this already.
there is an easy fix , use required_if instead of required
{
"validation": {
"rule": "required_if:id,null",
"messages": {
"required": "your message"
}
}
}
this will make it required in the create page only, or you can customize it as you wish.
required_if ref.
thankyou @alaamebrahim
that is the actual solution.
i'll close this as resolved
@alaamebrahim It's not really a solution. Because you can delete image and save without it.
This issue has been automatically locked since there has not been any recent activity after it was closed. If you have further questions please ask in our Slack group.
Most helpful comment
@alaamebrahim It's not really a solution. Because you can delete image and save without it.