validation.php 7.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163
  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. 'accepted_if' => '当 :other 为 :value 时,:attribute 必须被接受。',
  15. 'active_url' => ':attribute 不是有效的 URL。',
  16. 'after' => ':attribute 必须是 :date 之后的日期。',
  17. 'after_or_equal' => ':attribute 必须是等于或晚于 :date 的日期。',
  18. 'alpha' => ':attribute 只能包含字母。',
  19. 'alpha_dash' => ':attribute 只能包含字母、数字、破折号和下划线。',
  20. 'alpha_num' => ':attribute 只能包含字母和数字。',
  21. 'array' => ':attribute 必须是数组。',
  22. 'before' => ':attribute 必须是 :date 之前的日期。',
  23. 'before_or_equal' => ':attribute 必须是等于或早于 :date 的日期。',
  24. 'between' => [
  25. 'numeric' => ':attribute 必须在 :min 和 :max 之间。',
  26. 'file' => ':attribute 必须在 :min 和 :max 千字节之间。',
  27. 'string' => ':attribute 必须在 :min 和 :max 个字符之间。',
  28. 'array' => ':attribute 必须在 :min 和 :max 个元素之间。',
  29. ],
  30. 'boolean' => ':attribute 字段必须为 true 或 false。',
  31. 'confirmed' => ':attribute 两次输入不一致。',
  32. 'current_password' => '密码不正确。',
  33. 'date' => ':attribute 不是有效的日期。',
  34. 'date_equals' => ':attribute 必须是等于 :date 的日期。',
  35. 'date_format' => ':attribute 与格式 :format 不匹配。',
  36. 'declined' => ':attribute 必须被拒绝。',
  37. 'declined_if' => '当 :other 为 :value 时,:attribute 必须被拒绝。',
  38. 'different' => ':attribute 与 :other 必须不同。',
  39. 'digits' => ':attribute 必须是 :digits 位数字。',
  40. 'digits_between' => ':attribute 必须在 :min 和 :max 位数字之间。',
  41. 'dimensions' => ':attribute 的图片尺寸无效。',
  42. 'distinct' => ':attribute 字段存在重复值。',
  43. 'email' => ':attribute 必须是有效的电子邮件地址。',
  44. 'ends_with' => ':attribute 必须以下列之一结尾::values。',
  45. 'enum' => '所选的 :attribute 无效。',
  46. 'exists' => '所选的 :attribute 无效。',
  47. 'file' => ':attribute 必须是文件。',
  48. 'filled' => ':attribute 字段不能为空。',
  49. 'gt' => [
  50. 'numeric' => ':attribute 必须大于 :value。',
  51. 'file' => ':attribute 必须大于 :value 千字节。',
  52. 'string' => ':attribute 必须多于 :value 个字符。',
  53. 'array' => ':attribute 必须多于 :value 个元素。',
  54. ],
  55. 'gte' => [
  56. 'numeric' => ':attribute 必须大于或等于 :value。',
  57. 'file' => ':attribute 必须大于或等于 :value 千字节。',
  58. 'string' => ':attribute 必须大于或等于 :value 个字符。',
  59. 'array' => ':attribute 必须有 :value 个或更多元素。',
  60. ],
  61. 'image' => ':attribute 必须是图片。',
  62. 'in' => '所选的 :attribute 无效。',
  63. 'in_array' => ':attribute 字段不存在于 :other 中。',
  64. 'integer' => ':attribute 必须是整数。',
  65. 'ip' => ':attribute 必须是有效的 IP 地址。',
  66. 'ipv4' => ':attribute 必须是有效的 IPv4 地址。',
  67. 'ipv6' => ':attribute 必须是有效的 IPv6 地址。',
  68. 'mac_address' => ':attribute 必须是有效的 MAC 地址。',
  69. 'json' => ':attribute 必须是有效的 JSON 字符串。',
  70. 'lt' => [
  71. 'numeric' => ':attribute 必须小于 :value。',
  72. 'file' => ':attribute 必须小于 :value 千字节。',
  73. 'string' => ':attribute 必须少于 :value 个字符。',
  74. 'array' => ':attribute 必须少于 :value 个元素。',
  75. ],
  76. 'lte' => [
  77. 'numeric' => ':attribute 必须小于或等于 :value。',
  78. 'file' => ':attribute 必须小于或等于 :value 千字节。',
  79. 'string' => ':attribute 必须小于或等于 :value 个字符。',
  80. 'array' => ':attribute 不能多于 :value 个元素。',
  81. ],
  82. 'max' => [
  83. 'numeric' => ':attribute 不能大于 :max。',
  84. 'file' => ':attribute 不能大于 :max 千字节。',
  85. 'string' => ':attribute 不能多于 :max 个字符。',
  86. 'array' => ':attribute 不能多于 :max 个元素。',
  87. ],
  88. 'mimes' => ':attribute 必须是以下类型的文件::values。',
  89. 'mimetypes' => ':attribute 必须是以下类型的文件::values。',
  90. 'min' => [
  91. 'numeric' => ':attribute 至少为 :min。',
  92. 'file' => ':attribute 至少为 :min 千字节。',
  93. 'string' => ':attribute 至少为 :min 个字符。',
  94. 'array' => ':attribute 至少有 :min 个元素。',
  95. ],
  96. 'multiple_of' => ':attribute 必须是 :value 的倍数。',
  97. 'not_in' => '所选的 :attribute 无效。',
  98. 'not_regex' => ':attribute 格式无效。',
  99. 'numeric' => ':attribute 必须是数字。',
  100. 'password' => '密码不正确。',
  101. 'present' => ':attribute 字段必须存在。',
  102. 'prohibited' => ':attribute 字段被禁止。',
  103. 'prohibited_if' => '当 :other 为 :value 时,:attribute 字段被禁止。',
  104. 'prohibited_unless' => '除非 :other 在 :values 中,否则 :attribute 字段被禁止。',
  105. 'prohibits' => ':attribute 字段禁止 :other 出现。',
  106. 'regex' => ':attribute 格式无效。',
  107. 'required' => ':attribute 字段是必填项。',
  108. 'required_if' => '当 :other 为 :value 时,:attribute 字段是必填项。',
  109. 'required_unless' => '除非 :other 在 :values 中,否则 :attribute 字段是必填项。',
  110. 'required_with' => '当 :values 存在时,:attribute 字段是必填项。',
  111. 'required_with_all' => '当 :values 都存在时,:attribute 字段是必填项。',
  112. 'required_without' => '当 :values 不存在时,:attribute 字段是必填项。',
  113. 'required_without_all' => '当 :values 都不存在时,:attribute 字段是必填项。',
  114. 'same' => ':attribute 与 :other 必须匹配。',
  115. 'size' => [
  116. 'numeric' => ':attribute 必须为 :size。',
  117. 'file' => ':attribute 必须为 :size 千字节。',
  118. 'string' => ':attribute 必须为 :size 个字符。',
  119. 'array' => ':attribute 必须包含 :size 个元素。',
  120. ],
  121. 'starts_with' => ':attribute 必须以下列之一开头::values。',
  122. 'string' => ':attribute 必须是字符串。',
  123. 'timezone' => ':attribute 必须是有效的时区。',
  124. 'unique' => ':attribute 已经存在。',
  125. 'uploaded' => ':attribute 上传失败。',
  126. 'url' => ':attribute 必须是有效的 URL。',
  127. 'uuid' => ':attribute 必须是有效的 UUID。',
  128. /*
  129. |--------------------------------------------------------------------------
  130. | Custom Validation Language Lines
  131. |--------------------------------------------------------------------------
  132. |
  133. | Here you may specify custom validation messages for attributes using the
  134. | convention "attribute.rule" to name the lines. This makes it quick to
  135. | specify a specific custom language line for a given attribute rule.
  136. |
  137. */
  138. 'custom' => [
  139. 'attribute-name' => [
  140. 'rule-name' => 'custom-message',
  141. ],
  142. ],
  143. /*
  144. |--------------------------------------------------------------------------
  145. | Custom Validation Attributes
  146. |--------------------------------------------------------------------------
  147. |
  148. | The following language lines are used to swap our attribute placeholder
  149. | with something more reader friendly such as "E-Mail Address" instead
  150. | of "email". This simply helps us make our message more expressive.
  151. |
  152. */
  153. 'attributes' => [],
  154. ];