validation.php 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159
  1. <?php
  2. declare(strict_types=1);
  3. return [
  4. 'accepted' => 'The :attribute field must be accepted.',
  5. 'accepted_if' => 'The :attribute field must be accepted when :other is :value.',
  6. 'active_url' => 'The :attribute field must be a valid URL.',
  7. 'after' => 'The :attribute field must be a date after :date.',
  8. 'after_or_equal' => 'The :attribute field must be a date after or equal to :date.',
  9. 'alpha' => 'The :attribute field must only contain letters.',
  10. 'alpha_dash' => 'The :attribute field must only contain letters, numbers, dashes, and underscores.',
  11. 'alpha_num' => 'The :attribute field must only contain letters and numbers.',
  12. 'any_of' => 'The :attribute field is invalid.',
  13. 'array' => 'The :attribute field must be an array.',
  14. 'ascii' => 'The :attribute field must only contain single-byte alphanumeric characters and symbols.',
  15. 'before' => 'The :attribute field must be a date before :date.',
  16. 'before_or_equal' => 'The :attribute field must be a date before or equal to :date.',
  17. 'between' => [
  18. 'array' => 'The :attribute field must have between :min and :max items.',
  19. 'file' => 'The :attribute field must be between :min and :max kilobytes.',
  20. 'numeric' => 'The :attribute field must be between :min and :max.',
  21. 'string' => 'The :attribute field must be between :min and :max characters.',
  22. ],
  23. 'boolean' => 'The :attribute field must be true or false.',
  24. 'can' => 'The :attribute field contains an unauthorized value.',
  25. 'confirmed' => 'The :attribute field confirmation does not match.',
  26. 'contains' => 'The :attribute field is missing a required value.',
  27. 'current_password' => 'The password is incorrect.',
  28. 'date' => 'The :attribute field must be a valid date.',
  29. 'date_equals' => 'The :attribute field must be a date equal to :date.',
  30. 'date_format' => 'The :attribute field must match the format :format.',
  31. 'decimal' => 'The :attribute field must have :decimal decimal places.',
  32. 'declined' => 'The :attribute field must be declined.',
  33. 'declined_if' => 'The :attribute field must be declined when :other is :value.',
  34. 'different' => 'The :attribute field and :other must be different.',
  35. 'digits' => 'The :attribute field must be :digits digits.',
  36. 'digits_between' => 'The :attribute field must be between :min and :max digits.',
  37. 'dimensions' => 'The :attribute field has invalid image dimensions.',
  38. 'distinct' => 'The :attribute field has a duplicate value.',
  39. 'doesnt_contain' => 'The :attribute field must not contain any of the following: :values.',
  40. 'doesnt_end_with' => 'The :attribute field must not end with one of the following: :values.',
  41. 'doesnt_start_with' => 'The :attribute field must not start with one of the following: :values.',
  42. 'email' => 'The :attribute field must be a valid email address.',
  43. 'encoding' => 'The :attribute field must be encoded in :encoding.',
  44. 'ends_with' => 'The :attribute field must end with one of the following: :values.',
  45. 'enum' => 'The selected :attribute is invalid.',
  46. 'exists' => 'The selected :attribute is invalid.',
  47. 'extensions' => 'The :attribute field must have one of the following extensions: :values.',
  48. 'file' => 'The :attribute field must be a file.',
  49. 'filled' => 'The :attribute field must have a value.',
  50. 'gt' => [
  51. 'array' => 'The :attribute field must have more than :value items.',
  52. 'file' => 'The :attribute field must be greater than :value kilobytes.',
  53. 'numeric' => 'The :attribute field must be greater than :value.',
  54. 'string' => 'The :attribute field must be greater than :value characters.',
  55. ],
  56. 'gte' => [
  57. 'array' => 'The :attribute field must have :value items or more.',
  58. 'file' => 'The :attribute field must be greater than or equal to :value kilobytes.',
  59. 'numeric' => 'The :attribute field must be greater than or equal to :value.',
  60. 'string' => 'The :attribute field must be greater than or equal to :value characters.',
  61. ],
  62. 'hex_color' => 'The :attribute field must be a valid hexadecimal color.',
  63. 'image' => 'The :attribute field must be an image.',
  64. 'in' => 'The selected :attribute is invalid.',
  65. 'in_array' => 'The :attribute field must exist in :other.',
  66. 'in_array_keys' => 'The :attribute field must contain at least one of the following keys: :values.',
  67. 'integer' => 'The :attribute field must be an integer.',
  68. 'ip' => 'The :attribute field must be a valid IP address.',
  69. 'ipv4' => 'The :attribute field must be a valid IPv4 address.',
  70. 'ipv6' => 'The :attribute field must be a valid IPv6 address.',
  71. 'json' => 'The :attribute field must be a valid JSON string.',
  72. 'list' => 'The :attribute field must be a list.',
  73. 'lowercase' => 'The :attribute field must be lowercase.',
  74. 'lt' => [
  75. 'array' => 'The :attribute field must have less than :value items.',
  76. 'file' => 'The :attribute field must be less than :value kilobytes.',
  77. 'numeric' => 'The :attribute field must be less than :value.',
  78. 'string' => 'The :attribute field must be less than :value characters.',
  79. ],
  80. 'lte' => [
  81. 'array' => 'The :attribute field must not have more than :value items.',
  82. 'file' => 'The :attribute field must be less than or equal to :value kilobytes.',
  83. 'numeric' => 'The :attribute field must be less than or equal to :value.',
  84. 'string' => 'The :attribute field must be less than or equal to :value characters.',
  85. ],
  86. 'mac_address' => 'The :attribute field must be a valid MAC address.',
  87. 'max' => [
  88. 'array' => 'The :attribute field must not have more than :max items.',
  89. 'file' => 'The :attribute field must not be greater than :max kilobytes.',
  90. 'numeric' => 'The :attribute field must not be greater than :max.',
  91. 'string' => 'The :attribute field must not be greater than :max characters.',
  92. ],
  93. 'max_digits' => 'The :attribute field must not have more than :max digits.',
  94. 'mimes' => 'The :attribute field must be a file of type: :values.',
  95. 'mimetypes' => 'The :attribute field must be a file of type: :values.',
  96. 'min' => [
  97. 'array' => 'The :attribute field must have at least :min items.',
  98. 'file' => 'The :attribute field must be at least :min kilobytes.',
  99. 'numeric' => 'The :attribute field must be at least :min.',
  100. 'string' => 'The :attribute field must be at least :min characters.',
  101. ],
  102. 'min_digits' => 'The :attribute field must have at least :min digits.',
  103. 'missing' => 'The :attribute field must be missing.',
  104. 'missing_if' => 'The :attribute field must be missing when :other is :value.',
  105. 'missing_unless' => 'The :attribute field must be missing unless :other is :value.',
  106. 'missing_with' => 'The :attribute field must be missing when :values is present.',
  107. 'missing_with_all' => 'The :attribute field must be missing when :values are present.',
  108. 'multiple_of' => 'The :attribute field must be a multiple of :value.',
  109. 'not_in' => 'The selected :attribute is invalid.',
  110. 'not_regex' => 'The :attribute field format is invalid.',
  111. 'numeric' => 'The :attribute field must be a number.',
  112. 'password' => [
  113. 'letters' => 'The :attribute field must contain at least one letter.',
  114. 'mixed' => 'The :attribute field must contain at least one uppercase and one lowercase letter.',
  115. 'numbers' => 'The :attribute field must contain at least one number.',
  116. 'symbols' => 'The :attribute field must contain at least one symbol.',
  117. 'uncompromised' => 'The given :attribute has appeared in a data leak. Please choose a different :attribute.',
  118. ],
  119. 'present' => 'The :attribute field must be present.',
  120. 'present_if' => 'The :attribute field must be present when :other is :value.',
  121. 'present_unless' => 'The :attribute field must be present unless :other is :value.',
  122. 'present_with' => 'The :attribute field must be present when :values is present.',
  123. 'present_with_all' => 'The :attribute field must be present when :values are present.',
  124. 'prohibited' => 'The :attribute field is prohibited.',
  125. 'prohibited_if' => 'The :attribute field is prohibited when :other is :value.',
  126. 'prohibited_if_accepted' => 'The :attribute field is prohibited when :other is accepted.',
  127. 'prohibited_if_declined' => 'The :attribute field is prohibited when :other is declined.',
  128. 'prohibited_unless' => 'The :attribute field is prohibited unless :other is in :values.',
  129. 'prohibits' => 'The :attribute field prohibits :other from being present.',
  130. 'regex' => 'The :attribute field format is invalid.',
  131. 'required' => 'The :attribute field is required.',
  132. 'required_array_keys' => 'The :attribute field must contain entries for: :values.',
  133. 'required_if' => 'The :attribute field is required when :other is :value.',
  134. 'required_if_accepted' => 'The :attribute field is required when :other is accepted.',
  135. 'required_if_declined' => 'The :attribute field is required when :other is declined.',
  136. 'required_unless' => 'The :attribute field is required unless :other is in :values.',
  137. 'required_with' => 'The :attribute field is required when :values is present.',
  138. 'required_with_all' => 'The :attribute field is required when :values are present.',
  139. 'required_without' => 'The :attribute field is required when :values is not present.',
  140. 'required_without_all' => 'The :attribute field is required when none of :values are present.',
  141. 'same' => 'The :attribute field must match :other.',
  142. 'size' => [
  143. 'array' => 'The :attribute field must contain :size items.',
  144. 'file' => 'The :attribute field must be :size kilobytes.',
  145. 'numeric' => 'The :attribute field must be :size.',
  146. 'string' => 'The :attribute field must be :size characters.',
  147. ],
  148. 'starts_with' => 'The :attribute field must start with one of the following: :values.',
  149. 'string' => 'The :attribute field must be a string.',
  150. 'timezone' => 'The :attribute field must be a valid timezone.',
  151. 'ulid' => 'The :attribute field must be a valid ULID.',
  152. 'unique' => 'The :attribute has already been taken.',
  153. 'uploaded' => 'The :attribute failed to upload.',
  154. 'uppercase' => 'The :attribute field must be uppercase.',
  155. 'url' => 'The :attribute field must be a valid URL.',
  156. 'uuid' => 'The :attribute field must be a valid UUID.',
  157. ];