validation.php 9.2 KB

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