validation.php 6.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122
  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. '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. 'before' => ':attribute 必須是在 :date 之前的日期。',
  22. 'before_or_equal' => ':attribute 必須是在 :date 當天或之前的日期。',
  23. 'between' => [
  24. 'numeric' => ':attribute 必須在 :min 到 :max 之間。',
  25. 'file' => ':attribute 必須在 :min 到 :max KB 之間。',
  26. 'string' => ':attribute 必須在 :min 到 :max 個字母之間。',
  27. 'array' => ':attribute 必須在 :min 到 :max 個項目之間。',
  28. ],
  29. 'boolean' => ':attribute 欄位必須為真或假。',
  30. 'confirmed' => ':attribute 確認不符合。',
  31. 'date' => ':attribute 不是有效的日期。',
  32. 'date_format' => ':attribute 不符合格式 :format。',
  33. 'different' => ':attribute 與 :other 必須不同。',
  34. 'digits' => ':attribute 必須有 :digits 位。',
  35. 'digits_between' => ':attribute 必須在 :min 到 :max 位之間。',
  36. 'dimensions' => ':attribute 圖片尺寸無效。',
  37. 'distinct' => ':attribute 欄位有重複的值。',
  38. 'email' => ':attribute 必須為有效的電子郵件地址。',
  39. 'exists' => '選定的 :attribute 無效。',
  40. 'file' => ':attribute 必須為檔案。',
  41. 'filled' => ':attribute 欄位必須要有值。',
  42. 'image' => ':attribute 必須為圖片。',
  43. 'in' => '選定的 :attribute 無效。',
  44. 'in_array' => ':attribute 欄位在 :other 中不存在。',
  45. 'integer' => ':attribute 必須為整數。',
  46. 'ip' => ':attribute 必須為有效的 IP 位置。',
  47. 'ipv4' => ':attribute 必須為有效的 IPv4 位置。',
  48. 'ipv6' => ':attribute 必須為有效的 IPv6 位置。',
  49. 'json' => ':attribute 必須為有效的 JSON 字串。',
  50. 'max' => [
  51. 'numeric' => ':attribute 不能大於 :max。',
  52. 'file' => ':attribute 不能大於 :max KB。',
  53. 'string' => ':attribute 不能多於 :max 個字元。',
  54. 'array' => ':attribute 不能多於 :max 個項目。',
  55. ],
  56. 'mimes' => ':attribute 必須為這些類型的檔案: :values。',
  57. 'mimetypes' => ':attribute 必須為這些類型的檔案: :values。',
  58. 'min' => [
  59. 'numeric' => ':attribute 必須至少 :min。',
  60. 'file' => ':attribute 必須至少 :min KB。',
  61. 'string' => ':attribute 必須至少 :min 個字元。',
  62. 'array' => ':attribute 必須至少 :min 個項目。',
  63. ],
  64. 'not_in' => '選定的 :attribute 無效。',
  65. 'not_regex' => ':attribute 格式無效。',
  66. 'numeric' => ':attribute 必須為數字。',
  67. 'present' => ':attribute 欄位必須存在。',
  68. 'regex' => ':attribute 格式無效。',
  69. 'required' => ':attribute 欄位必填。',
  70. 'required_if' => ':attribute 在 :other 為 :value 時必填。',
  71. 'required_unless' => ':attribute 欄位為必填,除非 :other 為 :values。',
  72. 'required_with' => '在 :values 存在時,:attribute 為必填。',
  73. 'required_with_all' => '在 :values 存在時,:attribute 為必填。',
  74. 'required_without' => '在 :values 不存在時,:attribute 為必填。',
  75. 'required_without_all' => '在沒有 :values 存在時,:attribute 為必填。',
  76. 'same' => ':attribute 與 :other 必須符合。',
  77. 'size' => [
  78. 'numeric' => ':attribute 必須為 :size。',
  79. 'file' => ':attribute 必須為 :size KB。',
  80. 'string' => ':attribute 必須有 :size 個字元。',
  81. 'array' => ':attribute 必須包含 :size 個項目。',
  82. ],
  83. 'string' => ':attribute 必須為字串。',
  84. 'timezone' => ':attribute 必須為有效的區域。',
  85. 'unique' => ':attribute 已被取用。',
  86. 'uploaded' => ':attribute 上傳失敗。',
  87. 'url' => ':attribute 格式無效。',
  88. /*
  89. |--------------------------------------------------------------------------
  90. | Custom Validation Language Lines
  91. |--------------------------------------------------------------------------
  92. |
  93. | Here you may specify custom validation messages for attributes using the
  94. | convention "attribute.rule" to name the lines. This makes it quick to
  95. | specify a specific custom language line for a given attribute rule.
  96. |
  97. */
  98. 'custom' => [
  99. 'attribute-name' => [
  100. 'rule-name' => '自訂訊息',
  101. ],
  102. ],
  103. /*
  104. |--------------------------------------------------------------------------
  105. | Custom Validation Attributes
  106. |--------------------------------------------------------------------------
  107. |
  108. | The following language lines are used to swap attribute place-holders
  109. | with something more reader friendly such as E-Mail Address instead
  110. | of "email". This simply helps us make messages a little cleaner.
  111. |
  112. */
  113. 'attributes' => [],
  114. ];