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.

37 lines
758 B

5 years ago
5 years ago
  1. <?php
  2. declare(strict_types=1);
  3. namespace App\Request;
  4. use App\Request\BaseFormRequest;
  5. class WxminiPayRequest extends BaseFormRequest
  6. {
  7. /**
  8. * Get the validation rules that apply to the request.
  9. */
  10. public function rules(): array
  11. {
  12. return [
  13. 'order_id' => 'required|nonempty|integer',
  14. 'openid' => 'required|nonempty',
  15. 'money' => 'required|nonempty',
  16. ];
  17. }
  18. public function messages(): array
  19. {
  20. return [
  21. '*.*' => ':attribute 参数异常',
  22. ];
  23. }
  24. public function attributes(): array
  25. {
  26. return [
  27. 'order_id' => '订单',
  28. 'money' => '订单金额',
  29. 'openid' => '用户标识',
  30. ];
  31. }
  32. }