validation.php 7.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134
  1. <?php
  2. return [
  3. 'accepted' => 'The :attribute must be accepted.',
  4. 'active_url' => 'The :attribute is not a valid URL.',
  5. 'after' => 'The :attribute must be a date after :date.',
  6. 'after_or_equal' => 'The :attribute must be a date after or equal to :date.',
  7. 'alpha' => 'The :attribute may only contain letters.',
  8. 'alpha_dash' => 'The :attribute may only contain letters, numbers, dashes and underscores.',
  9. 'alpha_num' => 'The :attribute may only contain letters and numbers.',
  10. 'array' => 'The :attribute must be an array.',
  11. 'before' => 'The :attribute must be a date before :date.',
  12. 'before_or_equal' => 'The :attribute must be a date before or equal to :date.',
  13. 'between' => [
  14. 'numeric' => 'The :attribute must be between :min and :max.',
  15. 'file' => 'The :attribute must be between :min and :max kilobytes.',
  16. 'string' => 'The :attribute must be between :min and :max characters.',
  17. 'array' => 'The :attribute must have between :min and :max items.',
  18. ],
  19. 'boolean' => 'The :attribute field must be true or false.',
  20. 'confirmed' => 'The :attribute confirmation does not match.',
  21. 'date' => 'The :attribute is not a valid date.',
  22. 'date_equals' => 'The :attribute must be a date equal to :date.',
  23. 'date_format' => 'The :attribute does not match the format :format.',
  24. 'different' => 'The :attribute and :other must be different.',
  25. 'digits' => 'The :attribute must be :digits digits.',
  26. 'digits_between' => 'The :attribute must be between :min and :max digits.',
  27. 'dimensions' => 'The :attribute has invalid image dimensions.',
  28. 'distinct' => 'The :attribute field has a duplicate value.',
  29. 'email' => 'The :attribute must be a valid email address.',
  30. 'ends_with' => 'The :attribute must end with one of the following: :values.',
  31. 'exists' => 'The selected :attribute is invalid.',
  32. 'file' => 'The :attribute must be a file.',
  33. 'filled' => 'The :attribute field must have a value.',
  34. 'gt' => [
  35. 'numeric' => 'The :attribute must be greater than :value.',
  36. 'file' => 'The :attribute must be greater than :value kilobytes.',
  37. 'string' => 'The :attribute must be greater than :value characters.',
  38. 'array' => 'The :attribute must have more than :value items.',
  39. ],
  40. 'gte' => [
  41. 'numeric' => 'The :attribute must be greater than or equal :value.',
  42. 'file' => 'The :attribute must be greater than or equal :value kilobytes.',
  43. 'string' => 'The :attribute must be greater than or equal :value characters.',
  44. 'array' => 'The :attribute must have :value items or more.',
  45. ],
  46. 'image' => 'The :attribute must be an image.',
  47. 'in' => 'The selected :attribute is invalid.',
  48. 'in_array' => 'The :attribute field does not exist in :other.',
  49. 'integer' => 'The :attribute must be an integer.',
  50. 'ip' => 'The :attribute must be a valid IP address.',
  51. 'ipv4' => 'The :attribute must be a valid IPv4 address.',
  52. 'ipv6' => 'The :attribute must be a valid IPv6 address.',
  53. 'json' => 'The :attribute must be a valid JSON string.',
  54. 'lt' => [
  55. 'numeric' => 'The :attribute must be less than :value.',
  56. 'file' => 'The :attribute must be less than :value kilobytes.',
  57. 'string' => 'The :attribute must be less than :value characters.',
  58. 'array' => 'The :attribute must have less than :value items.',
  59. ],
  60. 'lte' => [
  61. 'numeric' => 'The :attribute must be less than or equal :value.',
  62. 'file' => 'The :attribute must be less than or equal :value kilobytes.',
  63. 'string' => 'The :attribute must be less than or equal :value characters.',
  64. 'array' => 'The :attribute must not have more than :value items.',
  65. ],
  66. 'max' => [
  67. 'numeric' => 'The :attribute may not be greater than :max.',
  68. 'file' => 'The :attribute may not be greater than :max kilobytes.',
  69. 'string' => 'The :attribute may not be greater than :max characters.',
  70. 'array' => 'The :attribute may not have more than :max items.',
  71. ],
  72. 'mimes' => 'The :attribute must be a file of type: :values.',
  73. 'mimetypes' => 'The :attribute must be a file of type: :values.',
  74. 'min' => [
  75. 'numeric' => 'The :attribute must be at least :min.',
  76. 'file' => 'The :attribute must be at least :min kilobytes.',
  77. 'string' => 'The :attribute must be at least :min characters.',
  78. 'array' => 'The :attribute must have at least :min items.',
  79. ],
  80. 'multiple_of' => 'The :attribute must be a multiple of :value',
  81. 'not_in' => 'The selected :attribute is invalid.',
  82. 'not_regex' => 'The :attribute format is invalid.',
  83. 'numeric' => 'The :attribute must be a number.',
  84. 'password' => 'The password is incorrect.',
  85. 'present' => 'The :attribute field must be present.',
  86. 'regex' => 'The :attribute format is invalid.',
  87. 'required' => 'The :attribute field is required.',
  88. 'required_if' => 'The :attribute field is required when :other is :value.',
  89. 'required_unless' => 'The :attribute field is required unless :other is in :values.',
  90. 'required_with' => 'The :attribute field is required when :values is present.',
  91. 'required_with_all' => 'The :attribute field is required when :values are present.',
  92. 'required_without' => 'The :attribute field is required when :values is not present.',
  93. 'required_without_all' => 'The :attribute field is required when none of :values are present.',
  94. 'same' => 'The :attribute and :other must match.',
  95. 'size' => [
  96. 'numeric' => 'The :attribute must be :size.',
  97. 'file' => 'The :attribute must be :size kilobytes.',
  98. 'string' => 'The :attribute must be :size characters.',
  99. 'array' => 'The :attribute must contain :size items.',
  100. ],
  101. 'starts_with' => 'The :attribute must start with one of the following: :values.',
  102. 'string' => 'The :attribute must be a string.',
  103. 'timezone' => 'The :attribute must be a valid zone.',
  104. 'unique' => 'The :attribute has already been taken.',
  105. 'uploaded' => 'The :attribute failed to upload.',
  106. 'url' => 'The :attribute format is invalid.',
  107. 'uuid' => 'The :attribute must be a valid UUID.',
  108. 'custom' => [
  109. 'attribute-name' => [
  110. 'rule-name' => 'custom-message',
  111. ],
  112. ],
  113. 'attributes' => [
  114. 'name' => 'Name',
  115. 'username' => 'Nick Name',
  116. 'email' => 'Email',
  117. 'password' => 'Password',
  118. 'password_confirmation' => 'Password Confirmation',
  119. 'phone' => 'Phone',
  120. 'day' => 'Day',
  121. 'month' => 'Month',
  122. 'year' => 'Year',
  123. 'hour' => 'Hour',
  124. 'minute' => 'Minute',
  125. 'second' => 'Second',
  126. 'title' => 'Title',
  127. 'content' => 'Content',
  128. 'description' => 'Description',
  129. 'excerpt' => 'Excerpt',
  130. 'date' => 'Date',
  131. 'time' => 'Time',
  132. ],
  133. ];