validation.php 7.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128
  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. 'attributes' => [],
  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. 'confirmed' => 'The :attribute confirmation does not match.',
  24. 'current_password' => 'The password is incorrect.',
  25. 'custom' => [
  26. 'attribute-name' => [
  27. 'rule-name' => 'custom-message',
  28. ],
  29. ],
  30. 'date' => 'The :attribute is not a valid date.',
  31. 'date_equals' => 'The :attribute must be a date equal to :date.',
  32. 'date_format' => 'The :attribute does not match the format :format.',
  33. 'declined' => 'The :attribute must be declined.',
  34. 'declined_if' => 'The :attribute must be declined when :other is :value.',
  35. 'different' => 'The :attribute and :other must be different.',
  36. 'digits' => 'The :attribute must be :digits digits.',
  37. 'digits_between' => 'The :attribute must be between :min and :max digits.',
  38. 'dimensions' => 'The :attribute has invalid image dimensions.',
  39. 'distinct' => 'The :attribute field has a duplicate value.',
  40. 'email' => 'The :attribute must be a valid email address.',
  41. 'ends_with' => 'The :attribute must end with one of the following: :values.',
  42. 'enum' => 'The selected :attribute is invalid.',
  43. 'exists' => 'The selected :attribute is invalid.',
  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. 'image' => 'The :attribute must be an image.',
  59. 'in' => 'The selected :attribute is invalid.',
  60. 'in_array' => 'The :attribute field does not exist in :other.',
  61. 'integer' => 'The :attribute must be an integer.',
  62. 'ip' => 'The :attribute must be a valid IP address.',
  63. 'ipv4' => 'The :attribute must be a valid IPv4 address.',
  64. 'ipv6' => 'The :attribute must be a valid IPv6 address.',
  65. 'json' => 'The :attribute must be a valid JSON string.',
  66. 'lt' => [
  67. 'array' => 'The :attribute must have less than :value items.',
  68. 'file' => 'The :attribute must be less than :value kilobytes.',
  69. 'numeric' => 'The :attribute must be less than :value.',
  70. 'string' => 'The :attribute must be less than :value characters.',
  71. ],
  72. 'lte' => [
  73. 'array' => 'The :attribute must not have more than :value items.',
  74. 'file' => 'The :attribute must be less than or equal to :value kilobytes.',
  75. 'numeric' => 'The :attribute must be less than or equal to :value.',
  76. 'string' => 'The :attribute must be less than or equal to :value characters.',
  77. ],
  78. 'mac_address' => 'The :attribute must be a valid MAC address.',
  79. 'max' => [
  80. 'array' => 'The :attribute must not have more than :max items.',
  81. 'file' => 'The :attribute must not be greater than :max kilobytes.',
  82. 'numeric' => 'The :attribute must not be greater than :max.',
  83. 'string' => 'The :attribute must not be greater than :max characters.',
  84. ],
  85. 'mimes' => 'The :attribute must be a file of type: :values.',
  86. 'mimetypes' => 'The :attribute must be a file of type: :values.',
  87. 'min' => [
  88. 'array' => 'The :attribute must have at least :min items.',
  89. 'file' => 'The :attribute must be at least :min kilobytes.',
  90. 'numeric' => 'The :attribute must be at least :min.',
  91. 'string' => 'The :attribute must be at least :min characters.',
  92. ],
  93. 'multiple_of' => 'The :attribute must be a multiple of :value.',
  94. 'not_in' => 'The selected :attribute is invalid.',
  95. 'not_regex' => 'The :attribute format is invalid.',
  96. 'numeric' => 'The :attribute must be a number.',
  97. 'password' => 'The password is incorrect.',
  98. 'present' => 'The :attribute field must be present.',
  99. 'prohibited' => 'The :attribute field is prohibited.',
  100. 'prohibited_if' => 'The :attribute field is prohibited when :other is :value.',
  101. 'prohibited_unless' => 'The :attribute field is prohibited unless :other is in :values.',
  102. 'prohibits' => 'The :attribute field prohibits :other from being present.',
  103. 'regex' => 'The :attribute format is invalid.',
  104. 'required' => 'The :attribute field is required.',
  105. 'required_array_keys' => 'The :attribute field must contain entries for: :values.',
  106. 'required_if' => 'The :attribute field is required when :other is :value.',
  107. 'required_unless' => 'The :attribute field is required unless :other is in :values.',
  108. 'required_with' => 'The :attribute field is required when :values is present.',
  109. 'required_with_all' => 'The :attribute field is required when :values are present.',
  110. 'required_without' => 'The :attribute field is required when :values is not present.',
  111. 'required_without_all' => 'The :attribute field is required when none of :values are present.',
  112. 'same' => 'The :attribute and :other must match.',
  113. 'size' => [
  114. 'array' => 'The :attribute must contain :size items.',
  115. 'file' => 'The :attribute must be :size kilobytes.',
  116. 'numeric' => 'The :attribute must be :size.',
  117. 'string' => 'The :attribute must be :size characters.',
  118. ],
  119. 'starts_with' => 'The :attribute must start with one of the following: :values.',
  120. 'string' => 'The :attribute must be a string.',
  121. 'timezone' => 'The :attribute must be a valid timezone.',
  122. 'unique' => 'The :attribute has already been taken.',
  123. 'uploaded' => 'The :attribute failed to upload.',
  124. 'url' => 'The :attribute must be a valid URL.',
  125. 'uuid' => 'The :attribute must be a valid UUID.',
  126. ];