fix(i18n): 使用者密碼驗證訊息中文化
- 新增/編輯使用者時,密碼欄位的驗證錯誤訊息改為繁體中文顯示
This commit is contained in:
@@ -61,6 +61,10 @@ class UserController extends Controller
|
||||
'username' => ['required', 'string', 'max:255', 'unique:users'],
|
||||
'password' => ['required', 'string', 'min:8', 'confirmed'],
|
||||
'roles' => ['array'],
|
||||
], [
|
||||
'password.required' => '請輸入密碼',
|
||||
'password.min' => '密碼長度至少需 :min 個字元',
|
||||
'password.confirmed' => '密碼確認不符',
|
||||
]);
|
||||
|
||||
$user = User::create([
|
||||
@@ -105,6 +109,9 @@ class UserController extends Controller
|
||||
'username' => ['required', 'string', 'max:255', Rule::unique('users')->ignore($user->id)],
|
||||
'password' => ['nullable', 'string', 'min:8', 'confirmed'],
|
||||
'roles' => ['array'],
|
||||
], [
|
||||
'password.min' => '密碼長度至少需 :min 個字元',
|
||||
'password.confirmed' => '密碼確認不符',
|
||||
]);
|
||||
|
||||
$userData = [
|
||||
|
||||
Reference in New Issue
Block a user