validation.php 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198
  1. <?php
  2. return [
  3. 'accepted' => 'The :attribute field must be accepted.',
  4. 'accepted_if' => 'The :attribute must be accepted when :other is :value.',
  5. 'active_url' => 'The :attribute field must be a valid URL.',
  6. 'after' => 'The :attribute field must be a date after :date.',
  7. 'after_or_equal' => 'The :attribute field must be a date after or equal to :date.',
  8. 'alpha' => 'The :attribute field must only contain letters.',
  9. 'alpha_dash' => 'The :attribute field must only contain letters, numbers, dashes, and underscores.',
  10. 'alpha_num' => 'The :attribute field must only contain letters and numbers.',
  11. 'array' => 'The :attribute field must be an array.',
  12. 'before' => 'The :attribute field must be a date before :date.',
  13. 'before_or_equal' => 'The :attribute field must be a date before or equal to :date.',
  14. 'between' => [
  15. 'array' => 'The :attribute field must have between :min and :max items.',
  16. 'file' => 'The :attribute field must be between :min and :max kilobytes.',
  17. 'numeric' => 'The :attribute field must be between :min and :max.',
  18. 'string' => 'The :attribute field must be between :min and :max characters.',
  19. ],
  20. 'boolean' => 'The :attribute field must be true or false.',
  21. 'confirmed' => 'The :attribute field confirmation does not match.',
  22. 'current_password' => 'The password is incorrect.',
  23. 'date' => 'The :attribute field must be a valid date.',
  24. 'date_equals' => 'The :attribute field must be a date equal to :date.',
  25. 'date_format' => 'The :attribute field must match the format :format.',
  26. 'declined' => 'The :attribute must be declined.',
  27. 'declined_if' => 'The :attribute must be declined when :other is :value.',
  28. 'different' => 'The :attribute field and :other must be different.',
  29. 'digits' => 'The :attribute field must be :digits digits.',
  30. 'digits_between' => 'The :attribute field must be between :min and :max digits.',
  31. 'dimensions' => 'The :attribute field has invalid image dimensions.',
  32. 'distinct' => 'The :attribute field has a duplicate value.',
  33. 'email' => 'The :attribute field must be a valid email address.',
  34. 'ends_with' => 'The :attribute field must end with one of the following: :values.',
  35. 'enum' => 'The selected :attribute is invalid.',
  36. 'exists' => 'The selected :attribute is invalid.',
  37. 'file' => 'The :attribute field must be a file.',
  38. 'filled' => 'The :attribute field must have a value.',
  39. 'gt' => [
  40. 'array' => 'The :attribute field must have more than :value items.',
  41. 'file' => 'The :attribute field must be greater than :value kilobytes.',
  42. 'numeric' => 'The :attribute field must be greater than :value.',
  43. 'string' => 'The :attribute field must be greater than :value characters.',
  44. ],
  45. 'gte' => [
  46. 'array' => 'The :attribute field must have :value items or more.',
  47. 'file' => 'The :attribute field must be greater than or equal to :value kilobytes.',
  48. 'numeric' => 'The :attribute field must be greater than or equal to :value.',
  49. 'string' => 'The :attribute field must be greater than or equal to :value characters.',
  50. ],
  51. 'image' => 'The :attribute field must be an image.',
  52. 'in' => 'The selected :attribute is invalid.',
  53. 'in_array' => 'The :attribute field must exist in :other.',
  54. 'integer' => 'The :attribute field must be an integer.',
  55. 'ip' => 'The :attribute field must be a valid IP address.',
  56. 'ipv4' => 'The :attribute field must be a valid IPv4 address.',
  57. 'ipv6' => 'The :attribute field must be a valid IPv6 address.',
  58. 'json' => 'The :attribute field must be a valid JSON string.',
  59. 'lt' => [
  60. 'array' => 'The :attribute field must have less than :value items.',
  61. 'file' => 'The :attribute field must be less than :value kilobytes.',
  62. 'numeric' => 'The :attribute field must be less than :value.',
  63. 'string' => 'The :attribute field must be less than :value characters.',
  64. ],
  65. 'lte' => [
  66. 'array' => 'The :attribute field must not have more than :value items.',
  67. 'file' => 'The :attribute field must be less than or equal to :value kilobytes.',
  68. 'numeric' => 'The :attribute field must be less than or equal to :value.',
  69. 'string' => 'The :attribute field must be less than or equal to :value characters.',
  70. ],
  71. 'mac_address' => 'The :attribute must be a valid MAC address.',
  72. 'max' => [
  73. 'array' => 'The :attribute field must not have more than :max items.',
  74. 'file' => 'The :attribute field must not be greater than :max kilobytes.',
  75. 'numeric' => 'The :attribute field must not be greater than :max.',
  76. 'string' => 'The :attribute field must not be greater than :max characters.',
  77. ],
  78. 'mimes' => 'The :attribute field must be a file of type: :values.',
  79. 'mimetypes' => 'The :attribute field must be a file of type: :values.',
  80. 'min' => [
  81. 'array' => 'The :attribute field must have at least :min items.',
  82. 'file' => 'The :attribute field must be at least :min kilobytes.',
  83. 'numeric' => 'The :attribute field must be at least :min.',
  84. 'string' => 'The :attribute field must be at least :min characters.',
  85. ],
  86. 'multiple_of' => 'The :attribute field must be a multiple of :value.',
  87. 'not_in' => 'The selected :attribute is invalid.',
  88. 'not_regex' => 'The :attribute field format is invalid.',
  89. 'numeric' => 'The :attribute field must be a number.',
  90. 'password' => 'The password is incorrect.',
  91. 'present' => 'The :attribute field must be present.',
  92. 'prohibited' => 'The :attribute field is prohibited.',
  93. 'prohibited_if' => 'The :attribute field is prohibited when :other is :value.',
  94. 'prohibited_unless' => 'The :attribute field is prohibited unless :other is in :values.',
  95. 'prohibits' => 'The :attribute field prohibits :other from being present.',
  96. 'regex' => 'The :attribute field format is invalid.',
  97. 'required' => 'The :attribute field is required.',
  98. 'required_array_keys' => 'The :attribute field must contain entries for: :values.',
  99. 'required_if' => 'The :attribute field is required when :other is :value.',
  100. 'required_unless' => 'The :attribute field is required unless :other is in :values.',
  101. 'required_with' => 'The :attribute field is required when :values is present.',
  102. 'required_with_all' => 'The :attribute field is required when :values are present.',
  103. 'required_without' => 'The :attribute field is required when :values is not present.',
  104. 'required_without_all' => 'The :attribute field is required when none of :values are present.',
  105. 'same' => 'The :attribute field must match :other.',
  106. 'size' => [
  107. 'array' => 'The :attribute field must contain :size items.',
  108. 'file' => 'The :attribute field must be :size kilobytes.',
  109. 'numeric' => 'The :attribute field must be :size.',
  110. 'string' => 'The :attribute field must be :size characters.',
  111. ],
  112. 'starts_with' => 'The :attribute field must start with one of the following: :values.',
  113. 'string' => 'The :attribute field must be a string.',
  114. 'timezone' => 'The :attribute field must be a valid timezone.',
  115. 'unique' => 'The :attribute has already been taken.',
  116. 'uploaded' => 'The :attribute failed to upload.',
  117. 'url' => 'The :attribute field must be a valid URL.',
  118. 'uuid' => 'The :attribute field must be a valid UUID.',
  119. 'attributes' => [
  120. 'address' => 'Address',
  121. 'age' => 'Age',
  122. 'amount' => 'Amount',
  123. 'area' => 'Area',
  124. 'available' => 'Available',
  125. 'birthday' => 'Birthday',
  126. 'body' => 'Body',
  127. 'city' => 'City',
  128. 'content' => 'Content',
  129. 'country' => 'Country',
  130. 'created_at' => 'Created At',
  131. 'creator' => 'Creator',
  132. 'current_password' => 'Current Password',
  133. 'date' => 'Date',
  134. 'date_of_birth' => 'Date Of Birth',
  135. 'day' => 'Day',
  136. 'deleted_at' => 'Deleted At',
  137. 'description' => 'Description',
  138. 'district' => 'District',
  139. 'duration' => 'Duration',
  140. 'email' => 'Email',
  141. 'excerpt' => 'Excerpt',
  142. 'filter' => 'Filter',
  143. 'first_name' => 'First Name',
  144. 'gender' => 'Gender',
  145. 'group' => 'Group',
  146. 'hour' => 'Hour',
  147. 'image' => 'Image',
  148. 'last_name' => 'Last Name',
  149. 'lesson' => 'Lesson',
  150. 'line_address_1' => 'Line Address 1',
  151. 'line_address_2' => 'Line Address 2',
  152. 'message' => 'Message',
  153. 'middle_name' => 'Middle Name',
  154. 'minute' => 'Minute',
  155. 'mobile' => 'Mobile',
  156. 'month' => 'Month',
  157. 'name' => 'Name',
  158. 'national_code' => 'National Code',
  159. 'number' => 'Number',
  160. 'password' => 'Password',
  161. 'password_confirmation' => 'Password Confirmation',
  162. 'phone' => 'Phone',
  163. 'photo' => 'Photo',
  164. 'postal_code' => 'Postal Code',
  165. 'price' => 'Price',
  166. 'province' => 'Province',
  167. 'recaptcha_response_field' => 'Recaptcha Response Field',
  168. 'remember' => 'Remember',
  169. 'restored_at' => 'Restored At',
  170. 'result_text_under_image' => 'Result Text Under Image',
  171. 'role' => 'Role',
  172. 'second' => 'Second',
  173. 'sex' => 'Sex',
  174. 'short_text' => 'Short Text',
  175. 'size' => 'Size',
  176. 'state' => 'State',
  177. 'street' => 'Street',
  178. 'student' => 'Student',
  179. 'subject' => 'Subject',
  180. 'teacher' => 'Teacher',
  181. 'terms' => 'Terms',
  182. 'test_description' => 'Test Description',
  183. 'test_locale' => 'Test Locale',
  184. 'test_name' => 'Test Name',
  185. 'text' => 'Text',
  186. 'time' => 'Date/Time',
  187. 'title' => 'Title',
  188. 'updated_at' => 'Updated At',
  189. 'username' => 'Username',
  190. 'year' => 'Year',
  191. ],
  192. 'custom' => [
  193. 'attribute-name' => [
  194. 'rule-name' => 'custom-message',
  195. ],
  196. ],
  197. ];