validation.php 7.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150
  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 字符必须是 true 或 false',
  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必须是 jpeg, png, bmp 或者 gif 格式的图片',
  43. 'in' => '选定的 :attribute 是无效的',
  44. 'in_array' => ':attribute 字段不存在于 :other',
  45. 'integer' => ':attribute 必须是个整数',
  46. 'ip' => ':attribute必须是一个合法的 IP 地址。',
  47. 'ipv4' => 'The :attribute must be a valid IPv4 address.',
  48. 'ipv6' => 'The :attribute must be a valid IPv6 address.',
  49. 'json' => ':attribute必须是一个合法的 JSON 字符串',
  50. 'max' => [
  51. 'numeric' => ':attribute 的最大长度为 :max 位',
  52. 'file' => ':attribute 的最大为 :max',
  53. 'string' => ':attribute 的最大长度为 :max 字符',
  54. 'array' => ':attribute 的最大个数为 :max 个.',
  55. ],
  56. 'mimes' => ':attribute 的文件类型必须是 :values',
  57. 'mimetypes' => 'The :attribute must be a file of type: :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. 'numeric' => ':attribute 必须是数字',
  66. 'present' => ':attribute 必须存在',
  67. 'regex' => ':attribute 格式是无效的',
  68. 'required' => ':attribute 是必须的',
  69. 'required_if' => ':attribute 字段是必须的当 :other 是 :value',
  70. 'required_unless' => ':attribute 字段是必须的,除非 :other 是在 :values 中',
  71. 'required_with' => ':attribute 字段是必须的当 :values 是存在的',
  72. 'required_with_all' => ':attribute 字段是必须的当 :values 是存在的',
  73. 'required_without' => ':attribute 字段是必须的当 :values 是不存在的',
  74. 'required_without_all' => ':attribute 字段是必须的当 没有一个 :values 是存在的',
  75. 'same' => ':attribute和:other必须匹配',
  76. 'size' => [
  77. 'numeric' => ':attribute 必须是 :size 位',
  78. 'file' => ':attribute 必须是 :size KB',
  79. 'string' => ':attribute 必须是 :size 个字符',
  80. 'array' => ':attribute 必须包括 :size 项',
  81. ],
  82. 'string' => ':attribute 必须是一个字符串',
  83. 'timezone' => ':attribute 必须是个有效的时区.',
  84. 'unique' => ':attribute 已存在',
  85. 'uploaded' => 'The :attribute failed to upload.',
  86. 'url' => ':attribute 无效的格式',
  87. 'date_equals' => 'The :attribute must be a date equal to :date.',
  88. 'ends_with' => 'The :attribute must end with one of the following: :values',
  89. 'gt' => [
  90. 'numeric' => 'The :attribute must be greater than :value.',
  91. 'file' => 'The :attribute must be greater than :value kilobytes.',
  92. 'string' => 'The :attribute must be greater than :value characters.',
  93. 'array' => 'The :attribute must have more than :value items.',
  94. ],
  95. 'gte' => [
  96. 'numeric' => 'The :attribute must be greater than or equal :value.',
  97. 'file' => 'The :attribute must be greater than or equal :value kilobytes.',
  98. 'string' => 'The :attribute must be greater than or equal :value characters.',
  99. 'array' => 'The :attribute must have :value items or more.',
  100. ],
  101. 'lt' => [
  102. 'numeric' => 'The :attribute must be less than :value.',
  103. 'file' => 'The :attribute must be less than :value kilobytes.',
  104. 'string' => 'The :attribute must be less than :value characters.',
  105. 'array' => 'The :attribute must have less than :value items.',
  106. ],
  107. 'lte' => [
  108. 'numeric' => 'The :attribute must be less than or equal :value.',
  109. 'file' => 'The :attribute must be less than or equal :value kilobytes.',
  110. 'string' => 'The :attribute must be less than or equal :value characters.',
  111. 'array' => 'The :attribute must not have more than :value items.',
  112. ],
  113. 'not_regex' => 'The :attribute format is invalid.',
  114. 'starts_with' => 'The :attribute must start with one of the following: :values',
  115. 'uuid' => 'The :attribute must be a valid UUID.',
  116. /*
  117. |--------------------------------------------------------------------------
  118. | Custom Validation Language Lines
  119. |--------------------------------------------------------------------------
  120. |
  121. | Here you may specify custom validation messages for attributes using the
  122. | convention "attribute.rule" to name the lines. This makes it quick to
  123. | specify a specific custom language line for a given attribute rule.
  124. |
  125. */
  126. 'custom' => [
  127. 'attribute-name' => [
  128. 'rule-name' => 'custom-message',
  129. ],
  130. ],
  131. /*
  132. |--------------------------------------------------------------------------
  133. | Custom Validation Attributes
  134. |--------------------------------------------------------------------------
  135. |
  136. | The following language lines are used to swap our attribute placeholder
  137. | with something more reader friendly such as "E-Mail Address" instead
  138. | of "email". This simply helps us make our message more expressive.
  139. |
  140. */
  141. 'attributes' => [],
  142. ];