public function messages()
{
return [
'platform.name.required' => 'Name field is required',
];
}
Mar 27, 2020
4
Level 1
Override messages key inside a FormRequest
Hi,
Do you know if is it possible to override messages key inside a FormRequest ?
I have a message like this one :
"platform.name.required" => "Name field is required"
I have a problem when I catch the error in Vue because of the key "platform.name".
I tried to use this notation but the problem still here :
"platform" => [
"name" => [
"required" => "Name field is required"
]
]
Thank you :)
Level 53
@youtaka not sure why you can't access it. data.errors['platform.name'] will give you an array of errors for platform.name field.
Please or to participate in this conversation.