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.

70 lines
1.7 KiB

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