validation.php 8.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147
  1. <?php
  2. return [
  3. 'accepted' => '必須接受 :attribute。',
  4. 'accepted_if' => '當 :other 為 :value 時,必須接受 :attribute。',
  5. 'active_url' => ':attribute 不是有效的網址。',
  6. 'after' => ':attribute 必須是一個在 :date 之後的日期。',
  7. 'after_or_equal' => ':attribute 必須是一個在 :date 之後或等於 :date 的日期。',
  8. 'alpha' => ':attribute 只能包含字母。',
  9. 'alpha_dash' => ':attribute 只能包含字母、數字、破折號和底線。',
  10. 'alpha_num' => ':attribute 只能包含字母和數字。',
  11. 'array' => ':attribute 必須是一個陣列。',
  12. 'ascii' => ':attribute 只能包含單位元字母數字字符和符號。',
  13. 'before' => ':attribute 必須是一個在 :date 之前的日期。',
  14. 'before_or_equal' => ':attribute 必須是一個在 :date 之前或等於 :date 的日期。',
  15. 'between' => [
  16. 'array' => ':attribute 必須有介於 :min 和 :max 之間的項目。',
  17. 'file' => ':attribute 必須介於 :min 和 :max 千位元組之間。',
  18. 'numeric' => ':attribute 必須介於 :min 和 :max 之間。',
  19. 'string' => ':attribute 必須介於 :min 和 :max 個字符之間。',
  20. ],
  21. 'boolean' => ':attribute 欄位必須為真或假。',
  22. 'confirmed' => ':attribute 確認不匹配。',
  23. 'current_password' => '密碼不正確。',
  24. 'date' => ':attribute 不是有效的日期。',
  25. 'date_equals' => ':attribute 必須是一個等於 :date 的日期。',
  26. 'date_format' => ':attribute 與格式 :format 不匹配。',
  27. 'decimal' => ':attribute 必須有 :decimal 位小數。',
  28. 'declined' => ':attribute 必須被拒絕。',
  29. 'declined_if' => '當 :other 為 :value 時,:attribute 必須被拒絕。',
  30. 'different' => ':attribute 和 :other 必須不同。',
  31. 'digits' => ':attribute 必須是 :digits 位數字。',
  32. 'digits_between' => ':attribute 必須介於 :min 和 :max 位數字之間。',
  33. 'dimensions' => ':attribute 的圖像尺寸無效。',
  34. 'distinct' => ':attribute 欄位有重複的值。',
  35. 'doesnt_end_with' => ':attribute 不能以以下之一結尾::values。',
  36. 'doesnt_start_with' => ':attribute 不能以以下之一開始::values。',
  37. 'email' => ':attribute 必須是一個有效的電子郵件地址。',
  38. 'ends_with' => ':attribute 必須以以下之一結尾::values。',
  39. 'enum' => '選擇的 :attribute 無效。',
  40. 'exists' => '選擇的 :attribute 無效。',
  41. 'file' => ':attribute 必須是一個檔案。',
  42. 'filled' => ':attribute 欄位必須有一個值。',
  43. 'gt' => [
  44. 'array' => ':attribute 必須有多於 :value 個項目。',
  45. 'file' => ':attribute 必須大於 :value 千位元組。',
  46. 'numeric' => ':attribute 必須大於 :value。',
  47. 'string' => ':attribute 必須大於 :value 個字符。',
  48. ],
  49. 'gte' => [
  50. 'array' => ':attribute 必須有 :value 個或更多項目。',
  51. 'file' => ':attribute 必須大於或等於 :value 千位元組。',
  52. 'numeric' => ':attribute 必須大於或等於 :value。',
  53. 'string' => ':attribute 必須大於或等於 :value 個字符。',
  54. ],
  55. 'image' => ':attribute 必須是一張圖片。',
  56. 'in' => '選擇的 :attribute 無效。',
  57. 'in_array' => ':attribute 欄位在 :other 中不存在。',
  58. 'integer' => ':attribute 必須是一個整數。',
  59. 'ip' => ':attribute 必須是一個有效的 IP 地址。',
  60. 'ipv4' => ':attribute 必須是一個有效的 IPv4 地址。',
  61. 'ipv6' => ':attribute 必須是一個有效的 IPv6 地址。',
  62. 'json' => ':attribute 必須是一個有效的 JSON 字串。',
  63. 'lowercase' => ':attribute 必須為小寫字母。',
  64. 'lt' => [
  65. 'array' => ':attribute 必須有少於 :value 個項目。',
  66. 'file' => ':attribute 必須小於 :value 千位元組。',
  67. 'numeric' => ':attribute 必須小於 :value。',
  68. 'string' => ':attribute 必須少於 :value 個字符。',
  69. ],
  70. 'lte' => [
  71. 'array' => ':attribute 不能有超過 :value 個項目。',
  72. 'file' => ':attribute 必須小於或等於 :value 千位元組。',
  73. 'numeric' => ':attribute 必須小於或等於 :value。',
  74. 'string' => ':attribute 必須少於或等於 :value 個字符。',
  75. ],
  76. 'mac_address' => ':attribute 必須是一個有效的 MAC 地址。',
  77. 'max' => [
  78. 'array' => ':attribute 不能有超過 :max 個項目。',
  79. 'file' => ':attribute 不能大於 :max 千位元組。',
  80. 'numeric' => ':attribute 不能大於 :max。',
  81. 'string' => ':attribute 不能大於 :max 個字符。',
  82. ],
  83. 'max_digits' => ':attribute 不能有超過 :max 位數字。',
  84. 'mimes' => ':attribute 必須是類型為 :values 的檔案。',
  85. 'mimetypes' => ':attribute 必須是類型為 :values 的檔案。',
  86. 'min' => [
  87. 'array' => ':attribute 必須至少有 :min 個項目。',
  88. 'file' => ':attribute 必須至少為 :min 千位元組。',
  89. 'numeric' => ':attribute 必須至少為 :min。',
  90. 'string' => ':attribute 必須至少為 :min 個字符。',
  91. ],
  92. 'min_digits' => ':attribute 必須至少有 :min 位數字。',
  93. 'missing' => ':attribute 欄位必須缺失。',
  94. 'missing_if' => '當 :other 為 :value 時,:attribute 欄位必須缺失。',
  95. 'missing_unless' => '除非 :other 為 :value,否則 :attribute 欄位必須缺失。',
  96. 'missing_with' => '當 :values 存在時,:attribute 欄位必須缺失。',
  97. 'missing_with_all' => '當 :values 都存在時,:attribute 欄位必須缺失。',
  98. 'multiple_of' => ':attribute 必須是 :value 的倍數。',
  99. 'not_in' => '選擇的 :attribute 無效。',
  100. 'not_regex' => ':attribute 格式無效。',
  101. 'numeric' => ':attribute 必須是一個數字。',
  102. 'password' => [
  103. 'letters' => ':attribute 必須至少包含一個字母。',
  104. 'mixed' => ':attribute 必須至少包含一個大寫字母和一個小寫字母。',
  105. 'numbers' => ':attribute 必須至少包含一個數字。',
  106. 'symbols' => ':attribute 必須至少包含一個符號。',
  107. 'uncompromised' => '所提供的 :attribute 已出現在資料洩露中。請選擇不同的 :attribute。',
  108. ],
  109. 'present' => ':attribute 欄位必須存在。',
  110. 'prohibited' => ':attribute 欄位是被禁止的。',
  111. 'prohibited_if' => '當 :other 為 :value 時,:attribute 欄位是被禁止的。',
  112. 'prohibited_unless' => '除非 :other 在 :values 中,否則 :attribute 欄位是被禁止的。',
  113. 'prohibits' => ':attribute 欄位禁止 :other 存在。',
  114. 'regex' => ':attribute 格式無效。',
  115. 'required' => ':attribute 欄位是必填的。',
  116. 'required_array_keys' => ':attribute 欄位必須包含以下項目::values。',
  117. 'required_if' => '當 :other 為 :value 時,:attribute 欄位是必填的。',
  118. 'required_if_accepted' => '當 :other 被接受時,:attribute 欄位是必填的。',
  119. 'required_unless' => '除非 :other 在 :values 中,否則 :attribute 欄位是必填的。',
  120. 'required_with' => '當 :values 存在時,:attribute 欄位是必填的。',
  121. 'required_with_all' => '當 :values 都存在時,:attribute 欄位是必填的。',
  122. 'required_without' => '當 :values 不存在時,:attribute 欄位是必填的。',
  123. 'required_without_all' => '當所有 :values 都不存在時,:attribute 欄位是必填的。',
  124. 'same' => ':attribute 和 :other 必須匹配。',
  125. 'size' => [
  126. 'array' => ':attribute 必須包含 :size 個項目。',
  127. 'file' => ':attribute 必須為 :size 千位元組。',
  128. 'numeric' => ':attribute 必須是 :size。',
  129. 'string' => ':attribute 必須是 :size 個字符。',
  130. ],
  131. 'starts_with' => ':attribute 必須以以下之一開始::values。',
  132. 'string' => ':attribute 必須是一個字串。',
  133. 'timezone' => ':attribute 必須是一個有效的時區。',
  134. 'unique' => ':attribute 已經被使用。',
  135. 'uploaded' => ':attribute 上傳失敗。',
  136. 'uppercase' => ':attribute 必須是大寫字母。',
  137. 'url' => ':attribute 必須是一個有效的 URL。',
  138. 'ulid' => ':attribute 必須是一個有效的 ULID。',
  139. 'uuid' => ':attribute 必須是一個有效的 UUID。',
  140. 'custom' => [
  141. 'attribute-name' => [
  142. 'rule-name' => '自訂訊息',
  143. ],
  144. ],
  145. 'attributes' => [],
  146. ];