validation.php 9.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181
  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. ];