My code:

```
$data['from'] = '2020-03-20 20:30:00';
$data['to'] = '2020-03-21 00:45:00';
$validity = \Validator::make($data, [
    'from' => ['date_format:Y-m-d H:i:s'],
    'to' => ['date_format:Y-m-d H:i:s']
]);

// This if gets true, and the error message is:

```

> 
> The to does not match the format Y-m-d H:i:s
> 
> 
> 

```
if($validity->fails()) {
    dd($validity->errors());
}

```

and amazingly when I change `00:45:00` to `01:45:00` it doesn't get inside that if. How can I fix it?