<?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' => '年龄',
], ];

Laravel 中 validation 验证 返回中文提示 全局设置的更多相关文章

  1. laravel中的验证及利用uploadify上传图片

    $rules = [ 'password'=>'required|between:6,20|confirmed', ]; $message = [ 'password.required'=> ...

  2. 如何 Laravel 中验证 zip 压缩包里的文件?

    在 Laravel 程序中上传文件时,请求验证可以很好验证上传的文件.你可以要求上传文件必须为 图片 , 也可以限制文件字节 大小 , 也可以根据 mime types 或者 文件扩展名 过滤文件. ...

  3. 在系统中使用Bean Validation验证参数

    转自:http://www.importnew.com/18561.html 为什么要使用Bean Validation?  当我们实现某个接口时,都需要对入参数进行校验.例如下面的代码 1 2 3 ...

  4. laravel中,提交表单后给出提示例如添加成功,添加失败等等

    laravel中的表单插入,我想在表单插入成功后,可以像thinkphp一样可以有一个提示内容,上网Google,他们还是给出的方法就是 return redirect('/')->with(' ...

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

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

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

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

  7. 关于脱离laravel框架使用Illuminate/Validation验证器

    1.关于Illuminate/Validation验证器 Validation 类用于验证数据以及获取错误消息. github地址:github.com/illuminate/validation 文 ...

  8. ssm中返回中文字符串时出现乱码?

    问题:返回json格式时,前端ajax请求,响应数据接收正常:     返回String时,响应数据是乱码? 解决:@RequestMapping注解中添加:produces = "text ...

  9. Laravel中的信息验证 和 语言包

    首先,谈下语言包的问题 1.安装语言包,通过composer进行安装 composer require "overtrue/laravel-lang:dev-master" 2.成 ...

随机推荐

  1. C# dataGridView_CellValueChanged事件

    C# 输入完以后立即更新缓冲区(DataGridView CheckBox列checked变化后就触发CellValueChanged事件) 在DataGridView添加如下的事件( Current ...

  2. yii常用操作数据

    yii常用操作数据.php <?php defined('YII_DEBUG') or define('YII_DEBUG', true); //当在调试模式下,应用会保留更多日志信息,如果抛出 ...

  3. 2019-2-16-WPF-封装-dotnet-remoting-调用其他进程

    title author date CreateTime categories WPF 封装 dotnet remoting 调用其他进程 lindexi 2019-02-16 09:40:26 +0 ...

  4. 自学FPAG笔记之 " top_down “

    top_town设计:在FPGA中top_down(自顶向上)是十分重要的一种编程方法,优点:使用top_down方法去写代码会使得程序看起来十分简洁,缺点:top_down写的文件会特别多. 例子: ...

  5. WPF/Silverlight深度解决方案:(七)HLSL自定义渲染特效之完美攻略(中)

    原文:WPF/Silverlight深度解决方案:(七)HLSL自定义渲染特效之完美攻略(中) 通过上一节的解说,大家是否已经对HLSL有了较深刻的认识和理解,HLSL的渲染不仅仅局限于静态处理,通过 ...

  6. 使用vscode书写markdown文件

    插件推荐 markdown-preview-enhanced 打开 vscode 编辑器,在插件页搜索 markdown-preview-enhanced,接着点击 Install 按钮. 该插件的中 ...

  7. 关于serialize() FormData serializeArray()表单序列化

    serialize()  FormData  serializeArray()都是序列化表单,实现表单的异步提交 但是serialize()和serializeArray()都是只能序列化表单中的数据 ...

  8. oracle在不知道用户密码的时候,怎么样跳转到另外一个用户执行操作后并不影响该用户?

    我们通过如下的方法,可以安全使用该用户,然后再跳转回来,在某些时候比较有用 需要Alter user权限或DBA权限: SQL> select password from dba_users w ...

  9. SharePoint开发中怎样使用Visual Studio给你的Web Part加入图标

    版权声明:本文为博主原创文章.未经博主同意不得转载. https://blog.csdn.net/u012025054/article/details/36051545 SharePoint开发中怎样 ...

  10. Effective C++: 02构造、析构、赋值运算

    05:了解C++默默编写并调用哪些函数 1:一个空类,如果你自己没声明,编译器就会为它声明(编译器版本的)一个copy构造函数.一个copy assignment操作符和一个析构函数.此外如果你没有声 ...