I am doing project in laravel. There is a form containing fields as 'start_time' and 'end_time'. While creating form I used following validation rules in EventRequest.php file
public function rules()
{
return [
'start_time' => 'required|date_format:H:i',
'end_time' => 'required|date_format:H:i|after:start_time',];
}
This works well while creating form and storing values in database. There is a option as 'edit form' in my project.When I clicked edit form button then another form opens with database values so that we can edit, but I try to edit the value and click on Edit button then this shows me an error message as, "The start time does not match the format H:i. The end time does not match the format H:i.".
I don't know what's wrong with this. My database have columns as 'start_time' and 'end_time' with datatype 'time'. Please give any suggestion.
Thanks in advance.