برای تغییر پیغام های پیشفرض اعتبارسنجی لاراول 5.7 روش آسونی وجود داره که میتونید رشته های متنی دلخواه به زبان فارسی و حتی به هر زبان دیگه ای رو اضافه کنید.
روش کار :
وارد فایل موجود د ر مسیر زیر شوید
resources\lang\en\validation.php
در قسمت پائین به شما پیشنهادی رو داده که یتونید براحتی پیغامهای سفارشی اضافه کنید
/*
|--------------------------------------------------------------------------
| Custom Validation Language Lines
|--------------------------------------------------------------------------
|
| Here you may specify custom validation messages for attributes using the
| convention "attribute.rule" to name the lines. This makes it quick to
| specify a specific custom language line for a given attribute rule.
|
*/
'custom' => [
'name' =>['required' => 'الزامی میباشد'],
'email' =>['required' => 'الزامی میباشد'],
'password' =>['required' => 'الزامی میباشد'],
'email' => ['unique'=>':attribute قبلا ثبت شده'],
],
/*
|--------------------------------------------------------------------------
| Custom Validation Attributes
|--------------------------------------------------------------------------
|
| The following language lines are used to swap attribute place-holders
| with something more reader friendly such as E-Mail Address instead
| of "email". This simply helps us make messages a little cleaner.
|
*/
'attributes' => [
'name' => 'نام',
'email' => 'پست الکترونیک',
'password' => 'رمز عبور',
],