validation.php 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236
  1. <?php
  2. declare(strict_types=1);
  3. return [
  4. 'accepted' => 'The :attribute must be accepted.',
  5. 'accepted_if' => 'The :attribute must be accepted when :other is :value.',
  6. 'active_url' => 'The :attribute is not a valid URL.',
  7. 'after' => 'The :attribute must be a date after :date.',
  8. 'after_or_equal' => 'The :attribute must be a date after or equal to :date.',
  9. 'alpha' => 'The :attribute must only contain letters.',
  10. 'alpha_dash' => 'The :attribute must only contain letters, numbers, dashes and underscores.',
  11. 'alpha_num' => 'The :attribute must only contain letters and numbers.',
  12. 'array' => 'The :attribute must be an array.',
  13. 'ascii' => 'The :attribute field must only contain single-byte alphanumeric characters and symbols.',
  14. 'before' => 'The :attribute must be a date before :date.',
  15. 'before_or_equal' => 'The :attribute must be a date before or equal to :date.',
  16. 'between' => [
  17. 'array' => 'The :attribute must have between :min and :max items.',
  18. 'file' => 'The :attribute must be between :min and :max kilobytes.',
  19. 'numeric' => 'The :attribute must be between :min and :max.',
  20. 'string' => 'The :attribute must be between :min and :max characters.',
  21. ],
  22. 'boolean' => 'The :attribute field must be true or false.',
  23. 'can' => 'The :attribute field contains an unauthorized value.',
  24. 'confirmed' => 'The :attribute confirmation does not match.',
  25. 'current_password' => 'The password is incorrect.',
  26. 'date' => 'The :attribute is not a valid date.',
  27. 'date_equals' => 'The :attribute must be a date equal to :date.',
  28. 'date_format' => 'The :attribute does not match the format :format.',
  29. 'decimal' => 'The :attribute field must have :decimal decimal places.',
  30. 'declined' => 'The :attribute must be declined.',
  31. 'declined_if' => 'The :attribute must be declined when :other is :value.',
  32. 'different' => 'The :attribute and :other must be different.',
  33. 'digits' => 'The :attribute must be :digits digits.',
  34. 'digits_between' => 'The :attribute must be between :min and :max digits.',
  35. 'dimensions' => 'The :attribute has invalid image dimensions.',
  36. 'distinct' => 'The :attribute field has a duplicate value.',
  37. 'doesnt_end_with' => 'The :attribute field must not end with one of the following: :values.',
  38. 'doesnt_start_with' => 'The :attribute field must not start with one of the following: :values.',
  39. 'email' => 'The :attribute must be a valid email address.',
  40. 'ends_with' => 'The :attribute must end with one of the following: :values.',
  41. 'enum' => 'The selected :attribute is invalid.',
  42. 'exists' => 'The selected :attribute is invalid.',
  43. 'extensions' => 'The :attribute field must have one of the following extensions: :values.',
  44. 'file' => 'The :attribute must be a file.',
  45. 'filled' => 'The :attribute field must have a value.',
  46. 'gt' => [
  47. 'array' => 'The :attribute must have more than :value items.',
  48. 'file' => 'The :attribute must be greater than :value kilobytes.',
  49. 'numeric' => 'The :attribute must be greater than :value.',
  50. 'string' => 'The :attribute must be greater than :value characters.',
  51. ],
  52. 'gte' => [
  53. 'array' => 'The :attribute must have :value items or more.',
  54. 'file' => 'The :attribute must be greater than or equal to :value kilobytes.',
  55. 'numeric' => 'The :attribute must be greater than or equal to :value.',
  56. 'string' => 'The :attribute must be greater than or equal to :value characters.',
  57. ],
  58. 'hex_color' => 'The :attribute field must be a valid hexadecimal color.',
  59. 'image' => 'The :attribute must be an image.',
  60. 'in' => 'The selected :attribute is invalid.',
  61. 'in_array' => 'The :attribute field does not exist in :other.',
  62. 'integer' => 'The :attribute must be an integer.',
  63. 'ip' => 'The :attribute must be a valid IP address.',
  64. 'ipv4' => 'The :attribute must be a valid IPv4 address.',
  65. 'ipv6' => 'The :attribute must be a valid IPv6 address.',
  66. 'json' => 'The :attribute must be a valid JSON string.',
  67. 'lowercase' => 'The :attribute field must be lowercase.',
  68. 'lt' => [
  69. 'array' => 'The :attribute must have less than :value items.',
  70. 'file' => 'The :attribute must be less than :value kilobytes.',
  71. 'numeric' => 'The :attribute must be less than :value.',
  72. 'string' => 'The :attribute must be less than :value characters.',
  73. ],
  74. 'lte' => [
  75. 'array' => 'The :attribute must not have more than :value items.',
  76. 'file' => 'The :attribute must be less than or equal to :value kilobytes.',
  77. 'numeric' => 'The :attribute must be less than or equal to :value.',
  78. 'string' => 'The :attribute must be less than or equal to :value characters.',
  79. ],
  80. 'mac_address' => 'The :attribute must be a valid MAC address.',
  81. 'max' => [
  82. 'array' => 'The :attribute must not have more than :max items.',
  83. 'file' => 'The :attribute must not be greater than :max kilobytes.',
  84. 'numeric' => 'The :attribute must not be greater than :max.',
  85. 'string' => 'The :attribute must not be greater than :max characters.',
  86. ],
  87. 'max_digits' => 'The :attribute field must not have more than :max digits.',
  88. 'mimes' => 'The :attribute must be a file of type: :values.',
  89. 'mimetypes' => 'The :attribute must be a file of type: :values.',
  90. 'min' => [
  91. 'array' => 'The :attribute must have at least :min items.',
  92. 'file' => 'The :attribute must be at least :min kilobytes.',
  93. 'numeric' => 'The :attribute must be at least :min.',
  94. 'string' => 'The :attribute must be at least :min characters.',
  95. ],
  96. 'min_digits' => 'The :attribute field must have at least :min digits.',
  97. 'missing' => 'The :attribute field must be missing.',
  98. 'missing_if' => 'The :attribute field must be missing when :other is :value.',
  99. 'missing_unless' => 'The :attribute field must be missing unless :other is :value.',
  100. 'missing_with' => 'The :attribute field must be missing when :values is present.',
  101. 'missing_with_all' => 'The :attribute field must be missing when :values are present.',
  102. 'multiple_of' => 'The :attribute must be a multiple of :value.',
  103. 'not_in' => 'The selected :attribute is invalid.',
  104. 'not_regex' => 'The :attribute format is invalid.',
  105. 'numeric' => 'The :attribute must be a number.',
  106. 'password' => [
  107. 'letters' => 'The :attribute field must contain at least one letter.',
  108. 'mixed' => 'The :attribute field must contain at least one uppercase and one lowercase letter.',
  109. 'numbers' => 'The :attribute field must contain at least one number.',
  110. 'symbols' => 'The :attribute field must contain at least one symbol.',
  111. 'uncompromised' => 'The given :attribute has appeared in a data leak. Please choose a different :attribute.',
  112. ],
  113. 'present' => 'The :attribute field must be present.',
  114. 'present_if' => 'The :attribute field must be present when :other is :value.',
  115. 'present_unless' => 'The :attribute field must be present unless :other is :value.',
  116. 'present_with' => 'The :attribute field must be present when :values is present.',
  117. 'present_with_all' => 'The :attribute field must be present when :values are present.',
  118. 'prohibited' => 'The :attribute field is prohibited.',
  119. 'prohibited_if' => 'The :attribute field is prohibited when :other is :value.',
  120. 'prohibited_unless' => 'The :attribute field is prohibited unless :other is in :values.',
  121. 'prohibits' => 'The :attribute field prohibits :other from being present.',
  122. 'regex' => 'The :attribute format is invalid.',
  123. 'required' => 'The :attribute field is required.',
  124. 'required_array_keys' => 'The :attribute field must contain entries for: :values.',
  125. 'required_if' => 'The :attribute field is required when :other is :value.',
  126. 'required_if_accepted' => 'The :attribute field is required when :other is accepted.',
  127. 'required_unless' => 'The :attribute field is required unless :other is in :values.',
  128. 'required_with' => 'The :attribute field is required when :values is present.',
  129. 'required_with_all' => 'The :attribute field is required when :values are present.',
  130. 'required_without' => 'The :attribute field is required when :values is not present.',
  131. 'required_without_all' => 'The :attribute field is required when none of :values are present.',
  132. 'same' => 'The :attribute and :other must match.',
  133. 'size' => [
  134. 'array' => 'The :attribute must contain :size items.',
  135. 'file' => 'The :attribute must be :size kilobytes.',
  136. 'numeric' => 'The :attribute must be :size.',
  137. 'string' => 'The :attribute must be :size characters.',
  138. ],
  139. 'starts_with' => 'The :attribute must start with one of the following: :values.',
  140. 'string' => 'The :attribute must be a string.',
  141. 'timezone' => 'The :attribute must be a valid timezone.',
  142. 'ulid' => 'The :attribute field must be a valid ULID.',
  143. 'unique' => 'The :attribute has already been taken.',
  144. 'uploaded' => 'The :attribute failed to upload.',
  145. 'uppercase' => 'The :attribute field must be uppercase.',
  146. 'url' => 'The :attribute must be a valid URL.',
  147. 'uuid' => 'The :attribute must be a valid UUID.',
  148. 'attributes' => [
  149. 'address' => 'address',
  150. 'affiliate_url' => 'affiliate URL',
  151. 'age' => 'age',
  152. 'amount' => 'amount',
  153. 'area' => 'area',
  154. 'available' => 'available',
  155. 'birthday' => 'birthday',
  156. 'body' => 'body',
  157. 'city' => 'city',
  158. 'content' => 'content',
  159. 'country' => 'country',
  160. 'created_at' => 'created at',
  161. 'creator' => 'creator',
  162. 'currency' => 'currency',
  163. 'current_password' => 'current password',
  164. 'customer' => 'customer',
  165. 'date' => 'date',
  166. 'date_of_birth' => 'date of birth',
  167. 'day' => 'day',
  168. 'deleted_at' => 'deleted at',
  169. 'description' => 'description',
  170. 'district' => 'district',
  171. 'duration' => 'duration',
  172. 'email' => 'email',
  173. 'excerpt' => 'excerpt',
  174. 'filter' => 'filter',
  175. 'first_name' => 'first name',
  176. 'gender' => 'gender',
  177. 'group' => 'group',
  178. 'hour' => 'hour',
  179. 'image' => 'image',
  180. 'is_subscribed' => 'is subscribed',
  181. 'items' => 'items',
  182. 'last_name' => 'last name',
  183. 'lesson' => 'lesson',
  184. 'line_address_1' => 'line address 1',
  185. 'line_address_2' => 'line address 2',
  186. 'message' => 'message',
  187. 'middle_name' => 'middle name',
  188. 'minute' => 'minute',
  189. 'mobile' => 'mobile',
  190. 'month' => 'month',
  191. 'name' => 'name',
  192. 'national_code' => 'national code',
  193. 'number' => 'number',
  194. 'password' => 'password',
  195. 'password_confirmation' => 'password confirmation',
  196. 'phone' => 'phone',
  197. 'photo' => 'photo',
  198. 'postal_code' => 'postal code',
  199. 'preview' => 'preview',
  200. 'price' => 'price',
  201. 'product_id' => 'product ID',
  202. 'product_uid' => 'product UID',
  203. 'product_uuid' => 'product UUID',
  204. 'promo_code' => 'promo code',
  205. 'province' => 'province',
  206. 'quantity' => 'quantity',
  207. 'recaptcha_response_field' => 'recaptcha response field',
  208. 'remember' => 'remember',
  209. 'restored_at' => 'restored at',
  210. 'result_text_under_image' => 'result text under image',
  211. 'role' => 'role',
  212. 'second' => 'second',
  213. 'sex' => 'sex',
  214. 'shipment' => 'shipment',
  215. 'short_text' => 'short text',
  216. 'size' => 'size',
  217. 'state' => 'state',
  218. 'street' => 'street',
  219. 'student' => 'student',
  220. 'subject' => 'subject',
  221. 'teacher' => 'teacher',
  222. 'terms' => 'terms',
  223. 'test_description' => 'test description',
  224. 'test_locale' => 'test locale',
  225. 'test_name' => 'test name',
  226. 'text' => 'text',
  227. 'time' => 'time',
  228. 'title' => 'title',
  229. 'updated_at' => 'updated at',
  230. 'user' => 'user',
  231. 'username' => 'username',
  232. 'year' => 'year',
  233. ],
  234. ];