I am trying to change the way my errors display when my Laravel form is not filled in correctly. Currently, when I get an error. It displays like this.
name mag niet groter zijn dan 255 karakters.
Because this language is Dutch, I would like to change the 'name' attribute to 'naam'. I have tried to change the $attributesNames
like this but unfortunately it did not work.
$attributeNames = [
'name' => 'Naam'
];
This is what my validation function currently looks like.
/**
* @return array
*/
public function validateCampaign() {
// name needs to render as 'Naam'
return request()->validate([
'name' => 'required|max:255',
]);
}