validation.php 6.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122
  1. <?php
  2. return [
  3. /*
  4. |--------------------------------------------------------------------------
  5. | Validation Language Lines
  6. |--------------------------------------------------------------------------
  7. |
  8. | The following language lines contain the default error messages used by
  9. | the validator class. Some of these rules have multiple versions such
  10. | as the size rules. Feel free to tweak each of these messages here.
  11. |
  12. */
  13. 'accepted' => ':attribute 必须接受',
  14. 'active_url' => ':attribute 不是有效的url。',
  15. 'after' => ':attribute 必须是在 :date 之后的日期。',
  16. 'after_or_equal' => ':attribute 必须是在 :date 当天或之后的日期.',
  17. 'alpha' => ':attribute 只能包含字母',
  18. 'alpha_dash' => ':attribute 只能包含字母、数字和破折号。',
  19. 'alpha_num' => ':attribute 只能包含字母和数字',
  20. 'array' => ':attribute 必须是数组',
  21. 'before' => ':attribute 必须是在 :date 之前的日期',
  22. 'before_or_equal' => ':attribute 必须是在 :date 当天或之前的日期',
  23. 'between' => [
  24. 'numeric' => ':attribute 必须在 :min 到 :max 之间',
  25. 'file' => ':attribute 必须在 :min 到 :max KB 之间.',
  26. 'string' => ':attribute 必须在 :min 到 :max 个字母之间.',
  27. 'array' => ':attribute 必须在 :min 到 :max 个元素之间',
  28. ],
  29. 'boolean' => ':attribute 字段必须为真或假。',
  30. 'confirmed' => ':attribute 验证不匹配',
  31. 'date' => ':attribute 不是有效日期',
  32. 'date_format' => ':attribute 不符合格式 :format',
  33. 'different' => ':attribute 和 :other 必须不同',
  34. 'digits' => ':attribute 必须有 :digits 位',
  35. 'digits_between' => ':attribute 必须在 :min 到 :max 位之间',
  36. 'dimensions' => ':attribute 图片尺寸无效',
  37. 'distinct' => ':attribute 字段有重复的值。',
  38. 'email' => ':attribute 必须是有效的邮件地址',
  39. 'exists' => '选择的 :attribute 无效',
  40. 'file' => ':attribute 必须是文件。',
  41. 'filled' => ':attribute 字段必须有值。',
  42. 'image' => ':attribute 必须是图像。',
  43. 'in' => '选定的 :attribute 无效。',
  44. 'in_array' => ':attribute 字段在 :other 中不存在',
  45. 'integer' => ':attribute 必须是整数。',
  46. 'ip' => ':attribute 必须是有效的 IP 地址',
  47. 'ipv4' => ':attribute 必须是有效的 IPv4 地址。',
  48. 'ipv6' => ':attribute 必须是有效的 IPv6 地址。',
  49. 'json' => ':attribute 必须是有效的 JSON 字符串。',
  50. 'max' => [
  51. 'numeric' => ':attribute 不能大于 :max',
  52. 'file' => ':attribute 不能大于 :max KB',
  53. 'string' => ':attribute 不能多于 :max 个字符',
  54. 'array' => ':attribute 不能多于 :max 个项目',
  55. ],
  56. 'mimes' => ':attribute 必须为该类型的文件: :values.',
  57. 'mimetypes' => ':attribute 必须为该类型的文件: :values.',
  58. 'min' => [
  59. 'numeric' => ':attribute 必须至少 :min',
  60. 'file' => ':attribute 必须至少 :min KB',
  61. 'string' => ':attribute 必须至少 :min 个字符',
  62. 'array' => ':attribute 必须至少 :min 个项目',
  63. ],
  64. 'not_in' => '选定的 :attribute 无效。',
  65. 'not_regex' => ':attribute 格式无效。',
  66. 'numeric' => ':attribute 必须是数字。',
  67. 'present' => ':attribute 字段必须存在',
  68. 'regex' => ':attribute 格式无效。',
  69. 'required' => ':attribute 字段是必填的。',
  70. 'required_if' => ':attribute 字段在 :other 为 :value 时是必填的。',
  71. 'required_unless' => ':attribute 字段是必填的,除非 :other 为 :values。',
  72. 'required_with' => '当 :values 存在时, :attribute 字段是必填的。',
  73. 'required_with_all' => '当 :values 存在时, :attribute 字段是必填的。',
  74. 'required_without' => '当 :values 不存在时, :attribute 字段是必填的。',
  75. 'required_without_all' => '当没有 :values 存在时, :attribute 字段是必填的。',
  76. 'same' => ':attribute 和 :other 必须相同',
  77. 'size' => [
  78. 'numeric' => ':attribute 必须是: :size.',
  79. 'file' => ':attribute 必须是: :size KB.',
  80. 'string' => ':attribute 必须是: :size 个字符',
  81. 'array' => ':attribute 必须包含: :size 个项目',
  82. ],
  83. 'string' => ':attribute 必须是字符串。',
  84. 'timezone' => ':attribute 必须是有效的区域。',
  85. 'unique' => ':attribute 已被使用。',
  86. 'uploaded' => ':attribute 上传失败。',
  87. 'url' => ':attribute 格式无效。',
  88. /*
  89. |--------------------------------------------------------------------------
  90. | Custom Validation Language Lines
  91. |--------------------------------------------------------------------------
  92. |
  93. | Here you may specify custom validation messages for attributes using the
  94. | convention "attribute.rule" to name the lines. This makes it quick to
  95. | specify a specific custom language line for a given attribute rule.
  96. |
  97. */
  98. 'custom' => [
  99. 'attribute-name' => [
  100. 'rule-name' => '自定义消息',
  101. ],
  102. ],
  103. /*
  104. |--------------------------------------------------------------------------
  105. | Custom Validation Attributes
  106. |--------------------------------------------------------------------------
  107. |
  108. | The following language lines are used to swap attribute place-holders
  109. | with something more reader friendly such as E-Mail Address instead
  110. | of "email". This simply helps us make messages a little cleaner.
  111. |
  112. */
  113. 'attributes' => [],
  114. ];