validation.php 9.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180
  1. <?php
  2. return [
  3. /*
  4. |--------------------------------------------------------------------------
  5. | 验证提示语
  6. |--------------------------------------------------------------------------
  7. */
  8. 'accepted' => ':attribute 必须接受。',
  9. 'accepted_if' => '当 :other 为 :value 时 :attribute 必须接受。',
  10. 'active_url' => ':attribute 必须是一个有效的 URL。',
  11. 'after' => ':attribute 必须是 :date 之后的日期。',
  12. 'after_or_equal' => ':attribute 必须是 :date 之后或相同的日期。',
  13. 'alpha' => ':attribute 只能包含字母。',
  14. 'alpha_dash' => ':attribute 只能包含字母、数字、短横线和下划线。',
  15. 'alpha_num' => ':attribute 只能包含字母和数字。',
  16. 'any_of' => ':attribute 无效。',
  17. 'array' => ':attribute 必须是数组。',
  18. 'ascii' => ':attribute 只能包含 ASCII 字符。',
  19. 'before' => ':attribute 必须是 :date 之前的日期。',
  20. 'before_or_equal' => ':attribute 必须是 :date 之前或相同的日期。',
  21. 'between' => [
  22. 'array' => ':attribute 必须在 :min 到 :max 个之间。',
  23. 'file' => ':attribute 必须在 :min 到 :max KB 之间。',
  24. 'numeric' => ':attribute 必须在 :min 到 :max 之间。',
  25. 'string' => ':attribute 必须在 :min 到 :max 个字符之间。',
  26. ],
  27. 'boolean' => ':attribute 必须是布尔值。',
  28. 'can' => ':attribute 包含未授权的值。',
  29. 'confirmed' => ':attribute 两次输入不一致。',
  30. 'contains' => ':attribute 缺少必需值。',
  31. 'current_password' => '密码不正确。',
  32. 'date' => ':attribute 必须是有效日期。',
  33. 'date_equals' => ':attribute 必须等于 :date。',
  34. 'date_format' => ':attribute 格式必须为 :format。',
  35. 'decimal' => ':attribute 必须有 :decimal 位小数。',
  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. 'doesnt_contain' => ':attribute 不能包含以下内容::values。',
  44. 'doesnt_end_with' => ':attribute 不能以下列之一结尾::values。',
  45. 'doesnt_start_with' => ':attribute 不能以下列之一开头::values。',
  46. 'email' => ':attribute 必须是有效的邮箱地址。',
  47. 'encoding' => ':attribute 必须使用 :encoding 编码。',
  48. 'ends_with' => ':attribute 必须以下列之一结尾::values。',
  49. 'enum' => '所选的 :attribute 无效。',
  50. 'exists' => '所选的 :attribute 无效。',
  51. 'extensions' => ':attribute 必须具有以下扩展名之一::values。',
  52. 'file' => ':attribute 必须是文件。',
  53. 'filled' => ':attribute 必须有值。',
  54. 'gt' => [
  55. 'array' => ':attribute 必须多于 :value 个元素。',
  56. 'file' => ':attribute 必须大于 :value KB。',
  57. 'numeric' => ':attribute 必须大于 :value。',
  58. 'string' => ':attribute 必须大于 :value 个字符。',
  59. ],
  60. 'gte' => [
  61. 'array' => ':attribute 必须不少于 :value 个元素。',
  62. 'file' => ':attribute 必须大于等于 :value KB。',
  63. 'numeric' => ':attribute 必须大于等于 :value。',
  64. 'string' => ':attribute 必须大于等于 :value 个字符。',
  65. ],
  66. 'hex_color' => ':attribute 必须是有效的十六进制颜色值。',
  67. 'image' => ':attribute 必须是图片。',
  68. 'in' => '所选的 :attribute 无效。',
  69. 'in_array' => ':attribute 必须存在于 :other 中。',
  70. 'in_array_keys' => ':attribute 必须包含以下键之一::values。',
  71. 'integer' => ':attribute 必须是整数。',
  72. 'ip' => ':attribute 必须是有效的 IP 地址。',
  73. 'ipv4' => ':attribute 必须是有效的 IPv4 地址。',
  74. 'ipv6' => ':attribute 必须是有效的 IPv6 地址。',
  75. 'json' => ':attribute 必须是有效的 JSON 字符串。',
  76. 'list' => ':attribute 必须是列表。',
  77. 'lowercase' => ':attribute 必须是小写。',
  78. 'lt' => [
  79. 'array' => ':attribute 必须少于 :value 个元素。',
  80. 'file' => ':attribute 必须小于 :value KB。',
  81. 'numeric' => ':attribute 必须小于 :value。',
  82. 'string' => ':attribute 必须小于 :value 个字符。',
  83. ],
  84. 'lte' => [
  85. 'array' => ':attribute 不能多于 :value 个元素。',
  86. 'file' => ':attribute 必须小于等于 :value KB。',
  87. 'numeric' => ':attribute 必须小于等于 :value。',
  88. 'string' => ':attribute 必须小于等于 :value 个字符。',
  89. ],
  90. 'mac_address' => ':attribute 必须是有效的 MAC 地址。',
  91. 'max' => [
  92. 'array' => ':attribute 不能超过 :max 个元素。',
  93. 'file' => ':attribute 不能大于 :max KB。',
  94. 'numeric' => ':attribute 不能大于 :max。',
  95. 'string' => ':attribute 不能大于 :max 个字符。',
  96. ],
  97. 'max_digits' => ':attribute 不能超过 :max 位数字。',
  98. 'mimes' => ':attribute 必须是 :values 类型的文件。',
  99. 'mimetypes' => ':attribute 必须是 :values 类型的文件。',
  100. 'min' => [
  101. 'array' => ':attribute 至少有 :min 个元素。',
  102. 'file' => ':attribute 至少 :min KB。',
  103. 'numeric' => ':attribute 至少 :min。',
  104. 'string' => ':attribute 至少 :min 个字符。',
  105. ],
  106. 'min_digits' => ':attribute 至少 :min 位数字。',
  107. 'missing' => ':attribute 必须不存在。',
  108. 'missing_if' => '当 :other 为 :value 时 :attribute 必须不存在。',
  109. 'missing_unless' => '除非 :other 为 :value,否则 :attribute 必须不存在。',
  110. 'missing_with' => '当 :values 存在时 :attribute 必须不存在。',
  111. 'missing_with_all' => '当 :values 都存在时 :attribute 必须不存在。',
  112. 'multiple_of' => ':attribute 必须是 :value 的倍数。',
  113. 'not_in' => '所选的 :attribute 无效。',
  114. 'not_regex' => ':attribute 格式无效。',
  115. 'numeric' => ':attribute 必须是数字。',
  116. 'password' => [
  117. 'letters' => ':attribute 必须包含至少一个字母。',
  118. 'mixed' => ':attribute 必须包含至少一个大写和一个小写字母。',
  119. 'numbers' => ':attribute 必须包含至少一个数字。',
  120. 'symbols' => ':attribute 必须包含至少一个符号。',
  121. 'uncompromised' => ':attribute 已出现在数据泄露中,请更换。',
  122. ],
  123. 'present' => ':attribute 必须存在。',
  124. 'present_if' => '当 :other 为 :value 时 :attribute 必须存在。',
  125. 'present_unless' => '除非 :other 为 :value,否则 :attribute 必须存在。',
  126. 'present_with' => '当 :values 存在时 :attribute 必须存在。',
  127. 'present_with_all' => '当 :values 都存在时 :attribute 必须存在。',
  128. 'prohibited' => ':attribute 被禁止。',
  129. 'prohibited_if' => '当 :other 为 :value 时 :attribute 被禁止。',
  130. 'prohibited_if_accepted' => '当 :other 被接受时 :attribute 被禁止。',
  131. 'prohibited_if_declined' => '当 :other 被拒绝时 :attribute 被禁止。',
  132. 'prohibited_unless' => '除非 :other 在 :values 中,否则 :attribute 被禁止。',
  133. 'prohibits' => ':attribute 禁止 :other 出现。',
  134. 'regex' => ':attribute 格式无效。',
  135. 'required' => ':attribute 为必填项。',
  136. 'required_array_keys' => ':attribute 必须包含以下键::values。',
  137. 'required_if' => '当 :other 为 :value 时 :attribute 为必填项。',
  138. 'required_if_accepted' => '当 :other 被接受时 :attribute 为必填项。',
  139. 'required_if_declined' => '当 :other 被拒绝时 :attribute 为必填项。',
  140. 'required_unless' => '除非 :other 在 :values 中,否则 :attribute 为必填项。',
  141. 'required_with' => '当 :values 存在时 :attribute 为必填项。',
  142. 'required_with_all' => '当 :values 都存在时 :attribute 为必填项。',
  143. 'required_without' => '当 :values 不存在时 :attribute 为必填项。',
  144. 'required_without_all' => '当 :values 都不存在时 :attribute 为必填项。',
  145. 'same' => ':attribute 与 :other 必须相同。',
  146. 'size' => [
  147. 'array' => ':attribute 必须包含 :size 个元素。',
  148. 'file' => ':attribute 必须为 :size KB。',
  149. 'numeric' => ':attribute 必须为 :size。',
  150. 'string' => ':attribute 必须为 :size 个字符。',
  151. ],
  152. 'starts_with' => ':attribute 必须以下列之一开头::values。',
  153. 'string' => ':attribute 必须是字符串。',
  154. 'timezone' => ':attribute 必须是有效的时区。',
  155. 'unique' => ':attribute 已存在。',
  156. 'uploaded' => ':attribute 上传失败。',
  157. 'uppercase' => ':attribute 必须是大写。',
  158. 'url' => ':attribute 必须是有效的 URL。',
  159. 'ulid' => ':attribute 必须是有效的 ULID。',
  160. 'uuid' => ':attribute 必须是有效的 UUID。',
  161. /*
  162. |--------------------------------------------------------------------------
  163. | 自定义验证语言行
  164. |--------------------------------------------------------------------------
  165. */
  166. 'custom' => [
  167. 'attribute-name' => [
  168. 'rule-name' => 'custom-message',
  169. ],
  170. ],
  171. /*
  172. |--------------------------------------------------------------------------
  173. | 自定义属性名称
  174. |--------------------------------------------------------------------------
  175. */
  176. 'attributes' => [],
  177. ];