Open lhsazevedo opened 4 years ago
By default, Laravel's validation messages include the attribute name, contrary to the backend specification.
This was achieved by removing the first two words of each error message during runtime, instead of editing the language file directly. https://github.com/gothinkster/laravel-realworld-example-app/blob/86128fc60a020518c5956c3e4159dfe516fb12dd/app/Exceptions/Handler.php#L93-L99
Besides being unnecessary, this is a bad practice because, depending on the language, the name of the attribute will not necessarily be in the first two words.
The removal of attributes was even proposed by Laravel-Lang.
By default, Laravel's validation messages include the attribute name, contrary to the backend specification.
This was achieved by removing the first two words of each error message during runtime, instead of editing the language file directly. https://github.com/gothinkster/laravel-realworld-example-app/blob/86128fc60a020518c5956c3e4159dfe516fb12dd/app/Exceptions/Handler.php#L93-L99
Besides being unnecessary, this is a bad practice because, depending on the language, the name of the attribute will not necessarily be in the first two words.
The removal of attributes was even proposed by Laravel-Lang.