I have a form that have 2 options, image or video, only one of these are required at the same time, so if the user send a image the video field is not longer required, but the video field could still be present and empty in the payload, i have a form request where i need something like this.
'image' => 'required_if_empty:video|image|max:3000',
'video' => 'required_if_empty:imagen|url|max:255'
if image is empty and video is not empty: pass
if image is not empty and video is empty : pass
if image is not empty and video is not empty : fail
if imge is empty and video is empty : fails
This should work:
'image' => 'required_without:video',
'video' => 'required_without:image',
However this will not satisfy following condition:
if image is not empty and video is not empty : fail
I would leave this as a comment as it's not complete answer but I don't have enough points and quote below seems to contradict the quote above so this might be what you're looking for.
if the user send a image the video field is not longer required, but the video field could still be present and empty in the payload
For more check predefined validation rules here, and custom validation rules here.