After reading the docs, I've understood the strucutre in resources/lang/xx/validation.php
to add custom error messages.
'custom' => [
'name' => [
'required' => 'Please fill the name of the company'
]
],
My problem here is that after setting this up, I won't be able to use a field called name
to another resource, for instance a Please fill out your name
message. When overriding the method messages()
inside the FormRequest, I'm able to be more specific in these messages, but then I lose the Language
customization.
My question is: How can I go about setting up custom messages for different Form Requests and still keep the language system working in my favor?
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire