Level 16
Where are these rules located? The controller itself or a form request?
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
I have this:
'date' => 'required|date|after_or_equal:today',
'time' => 'required|date_format:H:i|after_or_equal:today',
It's currently 13:42, 2020-07-06.
For example, I entered 2020-07-07, which is tomorrow, in date field, and 07:30 in time field, it returns an error that says the time must be a date after or equal to today., which is expected.
But is there a way to include the date when validating time?
So the time field would check the time with the date? So it will go to validation like this: 2020-07-07 07:30
Please or to participate in this conversation.