validation.php 8.6 KB

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