<?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 是不可用的链接.',
'after' => '注意: :attribute 必须为一个在 :date 之后的时间.',
'alpha' => '注意: :attribute 只允许全部为字母.',
'alpha_dash' => '注意: :attribute 只允许字幕,数字和_连接符.',
'alpha_num' => '注意: :attribute 只允许字幕和数字.',
'array' => '注意: :attribute 必须为数组.',
'before' => '注意: :attribute 必须为一个在 :date 之前的时间.',
'between' => [
'numeric' => '注意: :attribute 必须在 :min 至 :max 之间.',
'file' => '注意: :attribute 必须限制在 :min 至 :max k.',
'string' => '注意: :attribute 必须在 :min 至 :max 字符.',
'array' => '注意: :attribute 必须包含 :min 至 :max 键.',
],
'boolean' => '注意: :attribute 字段必须为 true 或 false.',
'confirmed' => '注意: :attribute 确认不匹配.',
'date' => '注意: :attribute 是一个不可用的时间.',
'date_format' => '注意: :attribute 不匹配: format :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 必须为图片.',
'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 千字节.',
'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 千字节.',
'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 注意:
| convention "attribute.rule" to name 注意: 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
|--------------------------------------------------------------------------
|
| 注意: 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' => [], ];

  1.找到laravel框架中的resources\lang\找到en文件夹复制一份重命名zh

  2.然后复制以上代码到validation.php

  3.更改指定配置,找到config\app.php 找到'locale' => 'en',把en改成zh

  4.大功告成。

laravel表单中文错误提示本地化的更多相关文章

  1. Laravel表单验证提示设置多语言

    默认表单提示是英文的,我们可以安装语言包构建多语言环境. 根据版本选择命令 For Laravel 7.x : run composer require caouecs/laravel-lang:~6 ...

  2. Fort.js – 时尚、现代的表单填写进度提示效果

    Fort.js 是一款用于时尚.现代的表单填写进度提示效果的 JavaScript 库,你需要做的就是添加表单,剩下的任务就交给 Fort.js 算法了,使用非常简单.提供了Default.Gradi ...

  3. Laravel表单传值

    仔细阅读过Laravel官方文档的就不用看啦~ 整理下之前遇到的关于Laravel表单的一些小问题 表单传值无法传过去,因为laravel做了表单的防护 只需要将{{ csrf_field() }}放 ...

  4. django中ModelForm save方法 以及快速生成空表单或包含数据的表单 包含错误信息

    django中ModelForm学习系列一~save方法 Model代码 from django.db import models # Create your models here. class P ...

  5. Laravel 表单验证创建“表单请求”实现自定义请求类

    按照文档创建表单请求自定义类以后,调用总是403页面,咨询大佬说: public function authorize() { // 在表单验证类的这个方法这里要返回true,默认返回false,这个 ...

  6. 社群系统 ThinkSNS+ 中如何利用 Laravel 表单验证来验证用户名的?(我朝独有需求,两个字母占一个汉字。。。)

    ThinkSNS+后端框架使用laravel,每周和 laravel master 保持同步,而后台和 html 5 则采用 vue 开发.语言特性方面,采用 php 7 的严格模式. 言归正传,之所 ...

  7. laravel表单验证

    效果展示:         代码 实现: 后台: use Validator; public function login() { if($input = Input::all()){ //验证提交的 ...

  8. Servlet 快速开始 表单中文字段

    req.getParameter | getParameterValue 一大特点是 返回null表示没有. [web.xml] <servlet> <serlvlet-mappin ...

  9. Spring MVC 3 表单中文提交post请求和get请求乱码问题的解决方法

    在spring mvc 3.0 框架中,通过JSP页面.HTML页面以POST方式提交表单时,表单的参数传递到对应的servlet后会出现中文显示乱码的问题.解决办法可采用spring自带的过滤技术, ...

随机推荐

  1. mysql小白系列_10 mysql主从复制原理

    1.如何解决主从复制延迟的问题? (1)主从复制原理 http://www.cnblogs.com/jenvid/p/8410922.html 1.salve执行slave start,salve服务 ...

  2. 容器技术之Docker数据卷

    前一篇随笔中我们了解了docker的网络相关说明,回顾请参考https://www.cnblogs.com/qiuhom-1874/p/12952616.html:今天我们来聊一聊docker的数据管 ...

  3. android自动化

    1.环境安装 JDK 1.8 Appium Android_SDK python https://www.cnblogs.com/xiaohanzi/p/10676720.html https://b ...

  4. Unity 游戏框架搭建 2019 (四十八/四十九) MonoBehaviourSimplify 中的消息策略完善&关于发送事件的简单封装

    MonoBehaviourSimplify 中的消息策略完善 在上一篇,笔者说,MonoBehaviourSimplify 中的消息策略还有一些小问题.我们在这篇试着解决一下. 先贴出来代码: usi ...

  5. 3.CSS字体属性

    CSS Fonts(字体)属性用定义字体系列,大小粗细,和文字样式(如斜体) 3.1字体系列 CSS使用font-family属性定义文本字体系列 p { font-family:'微软雅黑' ;} ...

  6. 函数:exit()

    函数名: exit() 所在头文件:stdlib.h(如果是"VC6.0"的话头文件为:windows.h) 功 能: 关闭所有文件,终止正在执行的进程. exit(1)表示异常退 ...

  7. [Firefox附加组件]0002.添加菜单项

    Add-onSDK 还不能为火狐浏览器提供一个API添加新的菜单项.但它是可扩展的设计,所以任何人都可以建立和发布模块,使用插件开发者.大牛埃里克沃尔德写的MenuItems模块,能够使我们很方便的添 ...

  8. 【MOOC操作系统】测试题大题-进程调度 先入先服务算法例题 【某多道程序系统供用户使用的主存为100K,磁带机2台,打印机1台,采用可变分区存储管理,静态方式分配外围设备(进程获得所需全部设备才能进入内容),忽略用户作业的I/O时间。采用动态分区、首次匹配法(从低地址区开始)分配主存,一个作业创建一个进程,且运行中不紧缩内存。作业调度采用FCFS算法,在主存中的进程采用剩余时间最短调度算法。】

    分析图: 答案: (1) 8 : 00作业1到达,占有资源并调入主存运行. 8: 20作业2和3同时到达,但作业2因分不到打印机,只能在后备队列等待.作业3资源满足,可进主存运行,并与作业1平分CPU ...

  9. jchdl - GSL实例 - Shifter

    https://mp.weixin.qq.com/s/ngQji-xi4FCCbL_2ihUi_A   Shifter是移位节点的父类,定义了输入输出线,但是没有定义具体的移位方式,这个留给子类去实现 ...

  10. 串口助手下载-带时间戳的串口助手-极简串口助手-V1.1 自动保存配置参数 能显示收发时间方便调试

    1.串口助手下载 2.带时间戳的串口助手,每次收发指令带上了时间戳,方便调试 3.极简串口助手 4.简单易用 高速稳定 5.每次修改的参数都能自动保存,免去了重复配置的工作 下载地址:http://w ...