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.

69 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. 'delivery_no' => '',
  20. 'dada_fee' => 'nonempty',
  21. 'market_id' => 'required|nonempty|integer',
  22. 'user_id' => 'required|nonempty|integer',
  23. 'money' => 'required|nonempty',
  24. 'box_money' => '',
  25. 'ps_money' => '',
  26. 'mj_money' => '',
  27. 'xyh_money' => '',
  28. 'yhq_money' => '',
  29. 'yhq_money2' => '',
  30. 'zk_money' => '',
  31. 'tel' => 'required|nonempty',
  32. 'name' => 'required|nonempty',
  33. 'address' => 'required|nonempty',
  34. 'area' => '',
  35. 'lat' => 'required|nonempty',
  36. 'lng' => 'required|nonempty',
  37. 'note' => '',
  38. 'type' => 'required|nonempty',
  39. 'form_id' => '',
  40. 'form_id2' => '',
  41. 'delivery_time' => '',
  42. 'order_type' => 'nonempty',
  43. 'pay_type' => 'nonempty',
  44. 'coupon_id' => '',
  45. 'coupon_id2' => '',
  46. 'uniacid' => 'nonempty',
  47. 'store_list' => 'nonempty',
  48. 'receive_coupon_ids' => '',
  49. ];
  50. }
  51. public function messages(): array
  52. {
  53. return [
  54. '*.*' => ':attribute 参数异常'
  55. ];
  56. }
  57. public function attributes(): array
  58. {
  59. return [
  60. ];
  61. }
  62. }