Laravel заголовок сообщения об ошибке валидатора пуст - PullRequest
0 голосов
/ 05 августа 2020

Откуда взялся заголовок с пустым значением? А также, как я могу ввести в него значение?

$validator = Validator::make($request->all(),
    ['workStartDate' => 'date_format:"m/d/Y"']);

if ($validator->fails()) {
    $messages = $validator->messages();
    $errors = $messages->get('workStartDate');

    return $this->errorInternalError($errors);
}

JSON Response

{
    "errors": [
        {
            "title": "",
            "details": [
                "The work start date does not match the format m/d/Y."
            ]
        }
    ]
}```
...