好湿?好紧?好多水好爽自慰,久久久噜久噜久久综合,成人做爰A片免费看黄冈,机机对机机30分钟无遮挡

主頁 > 知識庫 > Laravel修改驗證提示信息為中文的示例

Laravel修改驗證提示信息為中文的示例

熱門標簽:天潤融通外呼系統好嗎 電銷機器人沒有效果怎么樣 江西電銷機器人收費 杭州語音電銷機器人 欣思維地圖標注 泊頭在哪里辦理400電話 高德地圖標注位置怎么標注 江門回撥外呼系統 高德地圖標注店鋪收費嗎

1.覆蓋提示信息:

打開resource/lang/en/validation.php注釋掉英文提示信息

將下面的提示信息覆蓋英文提示信息

?php
 
return [
 
/*
|--------------------------------------------------------------------------
| Validation Language Lines
|--------------------------------------------------------------------------
|
| The following language lines contain the default error messages used by
| the validator class. Some of these rules have multiple versions such
| as the size rules. Feel free to tweak each of these messages here.
|
*/
 
'accepted'       => ':attribute 必須接受',
'active_url'      => ':attribute 必須是一個合法的 URL',
'after'        => ':attribute 必須是 :date 之后的一個日期',
'after_or_equal'    => ':attribute 必須是 :date 之后或相同的一個日期',
'alpha'        => ':attribute 只能包含字母',
'alpha_dash'      => ':attribute 只能包含字母、數字、中劃線或下劃線',
'alpha_num'      => ':attribute 只能包含字母和數字',
'array'        => ':attribute 必須是一個數組',
'before'        => ':attribute 必須是 :date 之前的一個日期',
'before_or_equal'   => ':attribute 必須是 :date 之前或相同的一個日期',
'between'       => [
  'numeric' => ':attribute 必須在 :min 到 :max 之間',
  'file'  => ':attribute 必須在 :min 到 :max KB 之間',
  'string' => ':attribute 必須在 :min 到 :max 個字符之間',
  'array'  => ':attribute 必須在 :min 到 :max 項之間',
],
'boolean'       => ':attribute 字符必須是 true 或 false',
'confirmed'      => ':attribute 二次確認不匹配',
'date'         => ':attribute 必須是一個合法的日期',
'date_format'     => ':attribute 與給定的格式 :format 不符合',
'different'      => ':attribute 必須不同于 :other',
'digits'        => ':attribute 必須是 :digits 位.',
'digits_between'    => ':attribute 必須在 :min 和 :max 位之間',
'dimensions'      => ':attribute 具有無效的圖片尺寸',
'distinct'       => ':attribute 字段具有重復值',
'email'        => ':attribute 必須是一個合法的電子郵件地址',
'exists'        => '選定的 :attribute 是無效的.',
'file'         => ':attribute 必須是一個文件',
'filled'        => ':attribute 的字段是必填的',
'image'        => ':attribute 必須是 jpeg, png, bmp 或者 gif 格式的圖片',
'in'          => '選定的 :attribute 是無效的',
'in_array'       => ':attribute 字段不存在于 :other',
'integer'       => ':attribute 必須是個整數',
'ip'          => ':attribute 必須是一個合法的 IP 地址。',
'json'         => ':attribute 必須是一個合法的 JSON 字符串',
'max'         => [
  'numeric' => ':attribute 的最大長度為 :max 位',
  'file'  => ':attribute 的最大為 :max',
  'string' => ':attribute 的最大長度為 :max 字符',
  'array'  => ':attribute 的最大個數為 :max 個.',
],
'mimes'        => ':attribute 的文件類型必須是 :values',
'min'         => [
  'numeric' => ':attribute 的最小長度為 :min 位',
  'file'  => ':attribute 大小至少為 :min KB',
  'string' => ':attribute 的最小長度為 :min 字符',
  'array'  => ':attribute 至少有 :min 項',
],
'not_in'        => '選定的 :attribute 是無效的',
'numeric'       => ':attribute 必須是數字',
'present'       => ':attribute 字段必須存在',
'regex'        => ':attribute 格式是無效的',
'required'       => ':attribute 字段是必須的',
'required_if'     => ':attribute 字段是必須的當 :other 是 :value',
'required_unless'   => ':attribute 字段是必須的,除非 :other 是在 :values 中',
'required_with'    => ':attribute 字段是必須的當 :values 是存在的',
'required_with_all'  => ':attribute 字段是必須的當 :values 是存在的',
'required_without'   => ':attribute 字段是必須的當 :values 是不存在的',
'required_without_all' => ':attribute 字段是必須的當 沒有一個 :values 是存在的',
'same'         => ':attribute 和 :other 必須匹配',
'size'         => [
  'numeric' => ':attribute 必須是 :size 位',
  'file'  => ':attribute 必須是 :size KB',
  'string' => ':attribute 必須是 :size 個字符',
  'array'  => ':attribute 必須包括 :size 項',
],
'string'        => ':attribute 必須是一個字符串',
'timezone'       => ':attribute 必須是個有效的時區.',
'unique'        => ':attribute 已存在',
'url'         => ':attribute 無效的格式',
 
/*
|--------------------------------------------------------------------------
| 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' => [
  'attribute-name' => [
    'rule-name' => 'custom-message',
  ],
],
 
/*
|--------------------------------------------------------------------------
| 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'     => '名字',
  // 'age'     => '年齡',
],
 
];

2.安裝中文信息提示包

composer require "overtrue/laravel-lang:~3.0"

注冊服務提供者: config/app.php

'providers' => [
  // Illuminate\Translation\TranslationServiceProvider::class,
  Overtrue\LaravelLang\TranslationServiceProvider::class,
]

修改語言:config/app.php

'locale' => 'zh-CN',

以上這篇Laravel修改驗證提示信息為中文的示例就是小編分享給大家的全部內容了,希望能給大家一個參考,也希望大家多多支持腳本之家。

您可能感興趣的文章:
  • Laravel 錯誤提示本地化的實現
  • Laravel 實現添加多語言提示信息

標簽:駐馬店 石嘴山 深圳 江門 平涼 內江 大同 雙鴨山

巨人網絡通訊聲明:本文標題《Laravel修改驗證提示信息為中文的示例》,本文關鍵詞  Laravel,修改,驗證,提示,信息,;如發現本文內容存在版權問題,煩請提供相關信息告之我們,我們將及時溝通與處理。本站內容系統采集于網絡,涉及言論、版權與本站無關。
  • 相關文章
  • 下面列出與本文章《Laravel修改驗證提示信息為中文的示例》相關的同類信息!
  • 本頁收集關于Laravel修改驗證提示信息為中文的示例的相關信息資訊供網民參考!
  • 推薦文章
    主站蜘蛛池模板: 在厨房掀起裙子挺进去视频| 国产在线观看99| 国产精品视频不卡| 韩国黄色一级片| 黄色一级片免费| 克什克腾旗| 苗族做爰全过程A片| 成人丝瓜草莓榴莲向日葵秋葵| 秋霞在线欧美成人影院| Japanese拍击 调教 屁股| 久久er这里只有精品| 亚洲欧美日韩在线中文一| 日日干夜夜操视频| 无码深夜AAA片在线观看| 与乱淫孕妇孕交小说| 一级特黄60分钟免费看软件下载| 色情无码流水视频| 月夜直播免费观看高清视频大全| 色淫小说有声网站免费听| 91视频社区| 狠狠狠色7777综合久夜色撩人| 欧美老肥妇做.爰BBWW视频| 老师轻点插| 婷婷99狠狠躁天天躁中文字幕| 福利视频app导航| 亚洲AV无码网站推荐| 国内精品久久久久久久小说| 国产yw855.c免费视频| HD2中国成熟IPHONE69| 欧美日韩Av毛片免费看网站下载| 婬乱的护士HD在线观看| 免费看女人隐私秘?部位图片| 91xj视频| 免费观看片在线观看人数查询| 新婚被老板cao到哭H| 蜜桃my.1688.com| 色y视频| 明撩暗恋| 蜜桃在线播放| 摄影让我张开腿h文| 一个人观看的视频|