I am trying to make a rule if one is empty or not present then other is required but if both are not present then it give error. I have used this but if both are empty then it not give any error
'inventory_storage_container_id' => 'required_if:inventory_storage_space_id,=,null|integer|exists:inventory_storage_containers,id',
'inventory_storage_space_id' => 'required_if:inventory_storage_container_id,=,null|integer|exists:inventory_storage_spaces,id',
What i have to do ? This is a different scenario if i not include both field in request body it not give any error but i need an error if both are empty . This topic is not duplicate .