You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

39 lines
716 B

  1. <?php
  2. declare(strict_types=1);
  3. namespace App\Request\v3;
  4. use App\Request\BaseFormRequest;
  5. class UserOrderListRequest extends BaseFormRequest
  6. {
  7. /**
  8. * Get the validation rules that apply to the request.
  9. */
  10. public function rules(): array
  11. {
  12. return [
  13. 'user_id' => 'required|nonempty|integer',
  14. 'tab' => '',
  15. 'page' => 'required|nonempty',
  16. 'pagesize' => 'required|nonempty',
  17. ];
  18. }
  19. /**
  20. * @return array
  21. */
  22. public function messages(): array
  23. {
  24. return [
  25. '*.*' => ':attribute无效',
  26. ];
  27. }
  28. public function attributes(): array
  29. {
  30. return parent::attributes();
  31. }
  32. }