Reputation: 35
we have resources/lang directory in laravel so we can add our language directory in that and add validation.php and use that for translation of validation error messages but that does not exist in lumen , so how we can add our array of whole custom validation messages to auto use by laravel
Upvotes: 0
Views: 176
Reputation: 144
To do so, add your messages to custom array in the resources/lang/xx/validation.php language file.
Add custom email validation message :
'custom' => [
'email' => [
'required' => 'We need to know your e-mail address!',
],
],
Check lumen validation docs :https://lumen.laravel.com/docs/5.1/validation
Upvotes: 1