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.

72 lines
1.8 KiB

  1. <?php
  2. declare(strict_types=1);
  3. namespace App\Request;
  4. use Hyperf\Validation\Request\FormRequest;
  5. class OrderOnlineRequest extends FormRequest
  6. {
  7. /**
  8. * Determine if the user is authorized to make this request.
  9. */
  10. public function authorize(): bool
  11. {
  12. return true;
  13. }
  14. /**
  15. * Get the validation rules that apply to the request.
  16. */
  17. public function rules(): array
  18. {
  19. return [
  20. 'order_num' => 'nonempty',
  21. 'delivery_no' => '',
  22. 'dada_fee' => 'nonempty',
  23. 'market_id' => 'required|nonempty|integer',
  24. 'user_id' => 'required|nonempty|integer',
  25. 'money' => 'required|nonempty',
  26. 'box_money' => '',
  27. 'ps_money' => '',
  28. 'mj_money' => '',
  29. 'xyh_money' => '',
  30. 'yhq_money' => '',
  31. 'yhq_money2' => '',
  32. 'zk_money' => '',
  33. 'tel' => 'required|nonempty',
  34. 'name' => 'required|nonempty',
  35. 'address' => 'required|nonempty',
  36. 'area' => '',
  37. 'lat' => 'required|nonempty',
  38. 'lng' => 'required|nonempty',
  39. 'note' => '',
  40. 'type' => 'required|nonempty',
  41. 'form_id' => '',
  42. 'form_id2' => '',
  43. 'delivery_time' => '',
  44. 'order_type' => 'nonempty',
  45. 'pay_type' => 'nonempty',
  46. 'coupon_id' => '',
  47. 'coupon_id2' => '',
  48. 'uniacid' => 'nonempty',
  49. 'store_list' => 'nonempty',
  50. 'receive_coupon_ids' => '',
  51. ];
  52. }
  53. public function messages(): array
  54. {
  55. return [
  56. '*.*' => ':attribute 参数异常'
  57. ];
  58. }
  59. public function attributes(): array
  60. {
  61. return [
  62. ];
  63. }
  64. }