validation.php 9.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180
  1. <?php
  2. return [
  3. /*
  4. |--------------------------------------------------------------------------
  5. | 验证语言行
  6. |--------------------------------------------------------------------------
  7. |
  8. | 以下语言行包含验证器类使用的默认错误消息。某些规则有多个版本,
  9. | 如大小规则。您可以根据需要在此处调整每条消息。
  10. |
  11. */
  12. 'accepted' => ':attribute 必须被接受。',
  13. 'accepted_if' => '当 :other 为 :value 时,: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. 'ascii' => ':attribute 只能包含单字节的字母和符号。',
  22. 'before' => ':attribute 必须是 :date 之前的日期。',
  23. 'before_or_equal' => ':attribute 必须是 :date 之前或与其相等的日期。',
  24. 'between' => [
  25. 'array' => ':attribute 必须有 :min 到 :max 项。',
  26. 'file' => ':attribute 必须介于 :min 到 :max KB之间。',
  27. 'numeric' => ':attribute 必须介于 :min 到 :max 之间。',
  28. 'string' => ':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. 'decimal' => ':attribute 必须有 :decimal 位小数。',
  37. 'declined' => ':attribute 必须被拒绝。',
  38. 'declined_if' => '当 :other 为 :value 时,:attribute 必须被拒绝。',
  39. 'different' => ':attribute 和 :other 必须不同。',
  40. 'digits' => ':attribute 必须是 :digits 位数字。',
  41. 'digits_between' => ':attribute 必须在 :min 到 :max 位数字之间。',
  42. 'dimensions' => ':attribute 图片尺寸无效。',
  43. 'distinct' => ':attribute 字段有重复值。',
  44. 'doesnt_end_with' => ':attribute 不能以以下之一结尾: :values。',
  45. 'doesnt_start_with' => ':attribute 不能以以下之一开头: :values。',
  46. 'email' => ':attribute 必须是有效的电子邮件地址。',
  47. 'ends_with' => ':attribute 必须以以下之一结尾: :values。',
  48. 'enum' => '所选的 :attribute 无效。',
  49. 'exists' => '所选的 :attribute 无效。',
  50. 'file' => ':attribute 必须是文件。',
  51. 'filled' => ':attribute 字段必须有值。',
  52. 'gt' => [
  53. 'array' => ':attribute 必须多于 :value 项。',
  54. 'file' => ':attribute 必须大于 :value KB。',
  55. 'numeric' => ':attribute 必须大于 :value。',
  56. 'string' => ':attribute 必须大于 :value 个字符。',
  57. ],
  58. 'gte' => [
  59. 'array' => ':attribute 必须有 :value 项或更多。',
  60. 'file' => ':attribute 必须大于或等于 :value KB。',
  61. 'numeric' => ':attribute 必须大于或等于 :value。',
  62. 'string' => ':attribute 必须大于或等于 :value 个字符。',
  63. ],
  64. 'image' => ':attribute 必须是图像。',
  65. 'in' => '所选的 :attribute 无效。',
  66. 'in_array' => ':attribute 字段不存在于 :other 中。',
  67. 'integer' => ':attribute 必须是整数。',
  68. 'ip' => ':attribute 必须是有效的IP地址。',
  69. 'ipv4' => ':attribute 必须是有效的IPv4地址。',
  70. 'ipv6' => ':attribute 必须是有效的IPv6地址。',
  71. 'json' => ':attribute 必须是有效的JSON字符串。',
  72. 'lowercase' => ':attribute 必须为小写字母。',
  73. 'lt' => [
  74. 'array' => ':attribute 必须少于 :value 项。',
  75. 'file' => ':attribute 必须小于 :value KB。',
  76. 'numeric' => ':attribute 必须小于 :value。',
  77. 'string' => ':attribute 必须小于 :value 个字符。',
  78. ],
  79. 'lte' => [
  80. 'array' => ':attribute 不能多于 :value 项。',
  81. 'file' => ':attribute 必须小于或等于 :value KB。',
  82. 'numeric' => ':attribute 必须小于或等于 :value。',
  83. 'string' => ':attribute 必须小于或等于 :value 个字符。',
  84. ],
  85. 'mac_address' => ':attribute 必须是有效的MAC地址。',
  86. 'max' => [
  87. 'array' => ':attribute 不能多于 :max 项。',
  88. 'file' => ':attribute 不能大于 :max KB。',
  89. 'numeric' => ':attribute 不能大于 :max。',
  90. 'string' => ':attribute 不能大于 :max 个字符。',
  91. ],
  92. 'max_digits' => ':attribute 不能多于 :max 位数字。',
  93. 'mimes' => ':attribute 必须是以下类型的文件: :values。',
  94. 'mimetypes' => ':attribute 必须是以下类型的文件: :values。',
  95. 'min' => [
  96. 'array' => ':attribute 必须至少有 :min 项。',
  97. 'file' => ':attribute 至少为 :min KB。',
  98. 'numeric' => ':attribute 至少为 :min。',
  99. 'string' => ':attribute 至少为 :min 个字符。',
  100. ],
  101. 'min_digits' => ':attribute 必须至少有 :min 位数字。',
  102. 'missing' => ':attribute 字段必须缺失。',
  103. 'missing_if' => '当 :other 为 :value 时,:attribute 字段必须缺失。',
  104. 'missing_unless' => '除非 :other 是 :value,否则 :attribute 字段必须缺失。',
  105. 'missing_with' => '当 :values 存在时,:attribute 字段必须缺失。',
  106. 'missing_with_all' => '当 :values 存在时,:attribute 字段必须缺失。',
  107. 'multiple_of' => ':attribute 必须是 :value 的倍数。',
  108. 'not_in' => '所选的 :attribute 无效。',
  109. 'not_regex' => ':attribute 格式无效。',
  110. 'numeric' => ':attribute 必须是数字。',
  111. 'password' => [
  112. 'letters' => ':attribute 必须包含至少一个字母。',
  113. 'mixed' => ':attribute 必须包含至少一个大写字母和一个小写字母。',
  114. 'numbers' => ':attribute 必须包含至少一个数字。',
  115. 'symbols' => ':attribute 必须包含至少一个符号。',
  116. 'uncompromised' => '给定的 :attribute 已出现在数据泄露中,请选择不同的 :attribute。',
  117. ],
  118. 'present' => ':attribute 字段必须存在。',
  119. 'prohibited' => ':attribute 字段是禁止的。',
  120. 'prohibited_if' => '当 :other 为 :value 时,:attribute 字段是禁止的。',
  121. 'prohibited_unless' => '除非 :other 在 :values 中,否则 :attribute 字段是禁止的。',
  122. 'prohibits' => ':attribute 字段禁止 :other 出现。',
  123. 'regex' => ':attribute 格式无效。',
  124. 'required' => ':attribute 字段是必需的。',
  125. 'required_array_keys' => ':attribute 字段必须包含以下条目: :values。',
  126. 'required_if' => '当 :other 为 :value 时,:attribute 字段是必需的。',
  127. 'required_if_accepted' => '当 :other 被接受时,:attribute 字段是必需的。',
  128. 'required_unless' => '除非 :other 在 :values 中,否则 :attribute 字段是必需的。',
  129. 'required_with' => '当 :values 存在时,:attribute 字段是必需的。',
  130. 'required_with_all' => '当 :values 存在时,:attribute 字段是必需的。',
  131. 'required_without' => '当 :values 不存在时,:attribute 字段是必需的。',
  132. 'required_without_all' => '当 :values 都不存在时,:attribute 字段是必需的。',
  133. 'same' => ':attribute 和 :other 必须匹配。',
  134. 'size' => [
  135. 'array' => ':attribute 必须包含 :size 项。',
  136. 'file' => ':attribute 必须是 :size KB。',
  137. 'numeric' => ':attribute 必须是 :size。',
  138. 'string' => ':attribute 必须是 :size 个字符。',
  139. ],
  140. 'starts_with' => ':attribute 必须以以下之一开头: :values。',
  141. 'string' => ':attribute 必须是字符串。',
  142. 'timezone' => ':attribute 必须是有效的时区。',
  143. 'unique' => ':attribute 已经被占用。',
  144. 'uploaded' => ':attribute 上传失败。',
  145. 'uppercase' => ':attribute 必须是大写字母。',
  146. 'url' => ':attribute 必须是有效的URL。',
  147. 'ulid' => ':attribute 必须是有效的ULID。',
  148. 'uuid' => ':attribute 必须是有效的UUID。',
  149. /*
  150. |--------------------------------------------------------------------------
  151. | 自定义验证语言行
  152. |--------------------------------------------------------------------------
  153. |
  154. | 在此您可以为属性指定自定义的验证消息,使用 "attribute.rule" 的方式来
  155. | 命名这些行。这样您可以快速为某个属性的特定规则指定消息。
  156. |
  157. */
  158. 'custom' => [
  159. 'attribute-name' => [
  160. 'rule-name' => '自定义消息',
  161. ],
  162. ],
  163. /*
  164. |--------------------------------------------------------------------------
  165. | 自定义验证属性
  166. |--------------------------------------------------------------------------
  167. |
  168. | 以下语言行用于将属性占位符替换为更友好的名称,如 "E-Mail Address"
  169. | 而不是 "email"。这有助于使我们的消息更具表达性。
  170. |
  171. */
  172. 'attributes' => [],
  173. ];