I have these rules for 2 dates. But I want the before_or_equal rule to be followed only when retired_on date has been inputted. How do I do this? sometimes doesn't solve this problem. If there is no input on retired_on date, one has to be able to input entered_on without any errors. With these 2 rules, an error appears right at the beginning since retired_on default is blank.
'entered_on' => 'required|date_format:Y/m/d|before_or_equal:retired_on',
'retired_on' => 'date_format:Y/m/d|after_or_equal:entered_on',