validation.php 9.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150
  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. 'array' => 'The :attribute field must be an array.',
  13. 'ascii' => 'The :attribute field must only contain single-byte alphanumeric characters and symbols.',
  14. 'attributes' => [],
  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. 'current_password' => 'The password is incorrect.',
  27. 'custom' => [
  28. 'attribute-name' => [
  29. 'rule-name' => 'custom-message',
  30. ],
  31. ],
  32. 'date' => 'The :attribute field must be a valid date.',
  33. 'date_equals' => 'The :attribute field must be a date equal to :date.',
  34. 'date_format' => 'The :attribute field must match the format :format.',
  35. 'decimal' => 'The :attribute field must have :decimal decimal places.',
  36. 'declined' => 'The :attribute field must be declined.',
  37. 'declined_if' => 'The :attribute field must be declined when :other is :value.',
  38. 'different' => 'The :attribute field and :other must be different.',
  39. 'digits' => 'The :attribute field must be :digits digits.',
  40. 'digits_between' => 'The :attribute field must be between :min and :max digits.',
  41. 'dimensions' => 'The :attribute field has invalid image dimensions.',
  42. 'distinct' => 'The :attribute field has a duplicate value.',
  43. 'doesnt_end_with' => 'The :attribute field must not end with one of the following: :values.',
  44. 'doesnt_start_with' => 'The :attribute field must not start with one of the following: :values.',
  45. 'email' => 'The :attribute field must be a valid email address.',
  46. 'ends_with' => 'The :attribute field must end with one of the following: :values.',
  47. 'enum' => 'The selected :attribute is invalid.',
  48. 'exists' => 'The selected :attribute is invalid.',
  49. 'file' => 'The :attribute field must be a file.',
  50. 'filled' => 'The :attribute field must have a value.',
  51. 'gt' => [
  52. 'array' => 'The :attribute field must have more than :value items.',
  53. 'file' => 'The :attribute field must be greater than :value kilobytes.',
  54. 'numeric' => 'The :attribute field must be greater than :value.',
  55. 'string' => 'The :attribute field must be greater than :value characters.',
  56. ],
  57. 'gte' => [
  58. 'array' => 'The :attribute field must have :value items or more.',
  59. 'file' => 'The :attribute field must be greater than or equal to :value kilobytes.',
  60. 'numeric' => 'The :attribute field must be greater than or equal to :value.',
  61. 'string' => 'The :attribute field must be greater than or equal to :value characters.',
  62. ],
  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. 'integer' => 'The :attribute field must be an integer.',
  67. 'ip' => 'The :attribute field must be a valid IP address.',
  68. 'ipv4' => 'The :attribute field must be a valid IPv4 address.',
  69. 'ipv6' => 'The :attribute field must be a valid IPv6 address.',
  70. 'json' => 'The :attribute field must be a valid JSON string.',
  71. 'lowercase' => 'The :attribute field must be lowercase.',
  72. 'lt' => [
  73. 'array' => 'The :attribute field must have less than :value items.',
  74. 'file' => 'The :attribute field must be less than :value kilobytes.',
  75. 'numeric' => 'The :attribute field must be less than :value.',
  76. 'string' => 'The :attribute field must be less than :value characters.',
  77. ],
  78. 'lte' => [
  79. 'array' => 'The :attribute field must not have more than :value items.',
  80. 'file' => 'The :attribute field must be less than or equal to :value kilobytes.',
  81. 'numeric' => 'The :attribute field must be less than or equal to :value.',
  82. 'string' => 'The :attribute field must be less than or equal to :value characters.',
  83. ],
  84. 'mac_address' => 'The :attribute field must be a valid MAC address.',
  85. 'max' => [
  86. 'array' => 'The :attribute field must not have more than :max items.',
  87. 'file' => 'The :attribute field must not be greater than :max kilobytes.',
  88. 'numeric' => 'The :attribute field must not be greater than :max.',
  89. 'string' => 'The :attribute field must not be greater than :max characters.',
  90. ],
  91. 'max_digits' => 'The :attribute field must not have more than :max digits.',
  92. 'mimes' => 'The :attribute field must be a file of type: :values.',
  93. 'mimetypes' => 'The :attribute field must be a file of type: :values.',
  94. 'min' => [
  95. 'array' => 'The :attribute field must have at least :min items.',
  96. 'file' => 'The :attribute field must be at least :min kilobytes.',
  97. 'numeric' => 'The :attribute field must be at least :min.',
  98. 'string' => 'The :attribute field must be at least :min characters.',
  99. ],
  100. 'min_digits' => 'The :attribute field must have at least :min digits.',
  101. 'missing' => 'The :attribute field must be missing.',
  102. 'missing_if' => 'The :attribute field must be missing when :other is :value.',
  103. 'missing_unless' => 'The :attribute field must be missing unless :other is :value.',
  104. 'missing_with' => 'The :attribute field must be missing when :values is present.',
  105. 'missing_with_all' => 'The :attribute field must be missing when :values are present.',
  106. 'multiple_of' => 'The :attribute field must be a multiple of :value.',
  107. 'not_in' => 'The selected :attribute is invalid.',
  108. 'not_regex' => 'The :attribute field format is invalid.',
  109. 'numeric' => 'The :attribute field must be a number.',
  110. 'password' => [
  111. 'letters' => 'The :attribute field must contain at least one letter.',
  112. 'mixed' => 'The :attribute field must contain at least one uppercase and one lowercase letter.',
  113. 'numbers' => 'The :attribute field must contain at least one number.',
  114. 'symbols' => 'The :attribute field must contain at least one symbol.',
  115. 'uncompromised' => 'The given :attribute has appeared in a data leak. Please choose a different :attribute.',
  116. ],
  117. 'present' => 'The :attribute field must be 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 field 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 field must match :other.',
  133. 'size' => [
  134. 'array' => 'The :attribute field must contain :size items.',
  135. 'file' => 'The :attribute field must be :size kilobytes.',
  136. 'numeric' => 'The :attribute field must be :size.',
  137. 'string' => 'The :attribute field must be :size characters.',
  138. ],
  139. 'starts_with' => 'The :attribute field must start with one of the following: :values.',
  140. 'string' => 'The :attribute field must be a string.',
  141. 'timezone' => 'The :attribute field 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 field must be a valid URL.',
  147. 'uuid' => 'The :attribute field must be a valid UUID.',
  148. ];