Here is my validation:
Validator::validate($request->all(), [
'avatar.uri' => 'required',
]);
So I receiving the validation error like below.
The avatar.uri field is required.
I wanted to update the message to like as below.
The photo field is required.
I wanted to update avatar.uri attribute name to photo. So I updated language files like below. But not working.
// resources/lang/en/validation.php
'attributes' => [
'avatar.uri' => 'photo'
],
I tried another method, this also not working:
// resources/lang/en/validation.php
'attributes' => [
'avatar' => [
'uri' => 'photo'
]
],
How can I achieve that?