You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

177 lines
9.0 KiB

  1. <?php
  2. declare(strict_types=1);
  3. /**
  4. * This file is part of Hyperf.
  5. *
  6. * @link https://www.hyperf.io
  7. * @document https://hyperf.wiki
  8. * @contact group@hyperf.io
  9. * @license https://github.com/hyperf/hyperf/blob/master/LICENSE
  10. */
  11. return [
  12. /*
  13. |--------------------------------------------------------------------------
  14. | Validation Language Lines
  15. |--------------------------------------------------------------------------
  16. |
  17. | The following language lines contain the default error messages used by
  18. | the validator class. Some of these rules have multiple versions such
  19. | as the size rules. Feel free to tweak each of these messages here.
  20. |
  21. */
  22. 'accepted' => 'The :attribute must be accepted.',
  23. 'active_url' => 'The :attribute is not a valid URL.',
  24. 'after' => 'The :attribute must be a date after :date.',
  25. 'after_or_equal' => 'The :attribute must be a date after or equal to :date.',
  26. 'alpha' => 'The :attribute may only contain letters.',
  27. 'alpha_dash' => 'The :attribute may only contain letters, numbers, and dashes.',
  28. 'alpha_num' => 'The :attribute may only contain letters and numbers.',
  29. 'array' => 'The :attribute must be an array.',
  30. 'before' => 'The :attribute must be a date before :date.',
  31. 'before_or_equal' => 'The :attribute must be a date before or equal to :date.',
  32. 'between' => [
  33. 'numeric' => 'The :attribute must be between :min and :max.',
  34. 'file' => 'The :attribute must be between :min and :max kilobytes.',
  35. 'string' => 'The :attribute must be between :min and :max characters.',
  36. 'array' => 'The :attribute must have between :min and :max items.',
  37. ],
  38. 'boolean' => 'The :attribute field must be true or false.',
  39. 'confirmed' => 'The :attribute confirmation does not match.',
  40. 'date' => 'The :attribute is not a valid date.',
  41. 'date_format' => 'The :attribute does not match the format :format.',
  42. 'different' => 'The :attribute and :other must be different.',
  43. 'digits' => 'The :attribute must be :digits digits.',
  44. 'digits_between' => 'The :attribute must be between :min and :max digits.',
  45. 'dimensions' => 'The :attribute has invalid image dimensions.',
  46. 'distinct' => 'The :attribute field has a duplicate value.',
  47. 'email' => 'The :attribute must be a valid email address.',
  48. 'exists' => 'The selected :attribute is invalid.',
  49. 'file' => 'The :attribute must be a file.',
  50. 'filled' => 'The :attribute field is required.',
  51. 'gt' => [
  52. 'numeric' => 'The :attribute must be greater than :value',
  53. 'file' => 'The :attribute must be greater than :value kb',
  54. 'string' => 'The :attribute must be greater than :value characters',
  55. 'array' => 'The :attribute must be greater than :value items',
  56. ],
  57. 'gte' => [
  58. 'numeric' => 'The :attribute must be great than or equal to :value',
  59. 'file' => 'The :attribute must be great than or equal to :value kb',
  60. 'string' => 'The :attribute must be great than or equal to :value characters',
  61. 'array' => 'The :attribute must be great than or equal to :value items',
  62. ],
  63. 'image' => 'The :attribute must be an image.',
  64. 'in' => 'The selected :attribute is invalid.',
  65. 'in_array' => 'The :attribute field does not exist in :other.',
  66. 'integer' => 'The :attribute must be an integer.',
  67. 'ip' => 'The :attribute must be a valid IP address.',
  68. 'ipv4' => 'The :attribute must be a valid IPv4 address.',
  69. 'ipv6' => 'The :attribute must be a valid IPv6 address.',
  70. 'json' => 'The :attribute must be a valid JSON string.',
  71. 'lt' => [
  72. 'numeric' => 'The :attribute must be less than :value',
  73. 'file' => 'The :attribute must be less than :value kb',
  74. 'string' => 'The :attribute must be less than :value characters',
  75. 'array' => 'The :attribute must be less than :value items',
  76. ],
  77. 'lte' => [
  78. 'numeric' => 'The :attribute must be less than or equal to :value',
  79. 'file' => 'The :attribute must be less than or equal to :value kb',
  80. 'string' => 'The :attribute must be less than or equal to :value characters',
  81. 'array' => 'The :attribute must be less than or equal to :value items',
  82. ],
  83. 'max' => [
  84. 'numeric' => 'The :attribute may not be greater than :max.',
  85. 'file' => 'The :attribute may not be greater than :max kilobytes.',
  86. 'string' => 'The :attribute may not be greater than :max characters.',
  87. 'array' => 'The :attribute may not have more than :max items.',
  88. ],
  89. 'mimes' => 'The :attribute must be a file of type: :values.',
  90. 'mimetypes' => 'The :attribute must be a file of type: :values.',
  91. 'min' => [
  92. 'numeric' => 'The :attribute must be at least :min.',
  93. 'file' => 'The :attribute must be at least :min kilobytes.',
  94. 'string' => 'The :attribute must be at least :min characters.',
  95. 'array' => 'The :attribute must have at least :min items.',
  96. ],
  97. 'not_in' => 'The selected :attribute is invalid.',
  98. 'not_regex' => 'The :attribute cannot match a given regular rule.',
  99. 'numeric' => 'The :attribute must be a number.',
  100. 'present' => 'The :attribute field must be present.',
  101. 'regex' => 'The :attribute format is invalid.',
  102. 'required' => 'The :attribute field is required.',
  103. 'required_if' => 'The :attribute field is required when :other is :value.',
  104. 'required_unless' => 'The :attribute field is required unless :other is in :values.',
  105. 'required_with' => 'The :attribute field is required when :values is present.',
  106. 'required_with_all' => 'The :attribute field is required when :values is present.',
  107. 'required_without' => 'The :attribute field is required when :values is not present.',
  108. 'required_without_all' => 'The :attribute field is required when none of :values are present.',
  109. 'same' => 'The :attribute and :other must match.',
  110. 'size' => [
  111. 'numeric' => 'The :attribute must be :size.',
  112. 'file' => 'The :attribute must be :size kilobytes.',
  113. 'string' => 'The :attribute must be :size characters.',
  114. 'array' => 'The :attribute must contain :size items.',
  115. ],
  116. 'starts_with' => 'The :attribute must be start with :values ',
  117. 'string' => 'The :attribute must be a string.',
  118. 'timezone' => 'The :attribute must be a valid zone.',
  119. 'unique' => 'The :attribute has already been taken.',
  120. 'uploaded' => 'The :attribute failed to upload.',
  121. 'url' => 'The :attribute format is invalid.',
  122. 'uuid' => 'The :attribute is invalid UUID.',
  123. 'max_if' => [
  124. 'numeric' => 'The :attribute may not be greater than :max when :other is :value.',
  125. 'file' => 'The :attribute may not be greater than :max kilobytes when :other is :value.',
  126. 'string' => 'The :attribute may not be greater than :max characters when :other is :value.',
  127. 'array' => 'The :attribute may not have more than :max items when :other is :value.',
  128. ],
  129. 'min_if' => [
  130. 'numeric' => 'The :attribute must be at least :min when :other is :value.',
  131. 'file' => 'The :attribute must be at least :min kilobytes when :other is :value.',
  132. 'string' => 'The :attribute must be at least :min characters when :other is :value.',
  133. 'array' => 'The :attribute must have at least :min items when :other is :value.',
  134. ],
  135. 'between_if' => [
  136. 'numeric' => 'The :attribute must be between :min and :max when :other is :value.',
  137. 'file' => 'The :attribute must be between :min and :max kilobytes when :other is :value.',
  138. 'string' => 'The :attribute must be between :min and :max characters when :other is :value.',
  139. 'array' => 'The :attribute must have between :min and :max items when :other is :value.',
  140. ],
  141. /*
  142. |--------------------------------------------------------------------------
  143. | Custom Validation Language Lines
  144. |--------------------------------------------------------------------------
  145. |
  146. | Here you may specify custom validation messages for attributes using the
  147. | convention "attribute.rule" to name the lines. This makes it quick to
  148. | specify a specific custom language line for a given attribute rule.
  149. |
  150. */
  151. 'custom' => [
  152. 'attribute-name' => [
  153. 'rule-name' => 'custom-message',
  154. ],
  155. ],
  156. /*
  157. |--------------------------------------------------------------------------
  158. | Custom Validation Attributes
  159. |--------------------------------------------------------------------------
  160. |
  161. | The following language lines are used to swap attribute place-holders
  162. | with something more reader friendly such as E-Mail Address instead
  163. | of "email". This simply helps us make messages a little cleaner.
  164. |
  165. */
  166. 'attributes' => [],
  167. 'phone_number' => 'The :attribute must be a valid phone number',
  168. 'telephone_number' => 'The :attribute must be a valid telephone number',
  169. 'chinese_word' => 'The :attribute must contain valid characters(chinese/english character, number, underscore)',
  170. 'sequential_array' => 'The :attribute must be sequential array',
  171. ];