Skip to content

Commit

Permalink
避免提交负数数量恶意刷单
Browse files Browse the repository at this point in the history
  • Loading branch information
ZhangYiQiu authored Jul 31, 2022
1 parent e7222ae commit 5deddfc
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion app/Service/OrderService.php
Original file line number Diff line number Diff line change
Expand Up @@ -61,11 +61,12 @@ public function validatorCreateOrder(Request $request): void
'email' => ['required', 'email'],
'payway' => ['required', 'integer'],
'search_pwd' => [new SearchPwd()],
'by_amount' => ['required', 'integer'],
'by_amount' => ['required', 'integer', 'min:1'],
'img_verify_code' => [new VerifyImg()],
], [
'by_amount.required' => __('dujiaoka.prompt.buy_amount_format_error'),
'by_amount.integer' => __('dujiaoka.prompt.buy_amount_format_error'),
'by_amount.min' => __('dujiaoka.prompt.buy_amount_format_error'),
'payway.required' => __('dujiaoka.prompt.please_select_mode_of_payment'),
'payway.integer' => __('dujiaoka.prompt.please_select_mode_of_payment'),
'email.required' => __('dujiaoka.prompt.email_format_error'),
Expand Down

0 comments on commit 5deddfc

Please sign in to comment.