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.

35 lines
666 B

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