first version
This commit is contained in:
@@ -0,0 +1,38 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Requests\Recon;
|
||||
|
||||
use Modules\Common\Http\Requests\BaseFormRequest;
|
||||
|
||||
/**
|
||||
* 对账明细修改 验证(D4:订货量/称重/数量/金额/商品信息;diff 与头汇总由后端重算)
|
||||
*/
|
||||
class ReconItemUpdateRequest extends BaseFormRequest
|
||||
{
|
||||
protected $stopOnFirstFailure = true;
|
||||
|
||||
public function rules(): array
|
||||
{
|
||||
return [
|
||||
'product_name' => 'nullable|string|max:100',
|
||||
'quantity' => 'nullable|numeric|min:0',
|
||||
'weight' => 'nullable|numeric|min:0',
|
||||
'publish_amount' => 'nullable|numeric|min:0',
|
||||
'actual_amount' => 'nullable|numeric|min:0',
|
||||
];
|
||||
}
|
||||
|
||||
public function messages(): array
|
||||
{
|
||||
return [
|
||||
'quantity.numeric' => '订货量必须为数字',
|
||||
'quantity.min' => '订货量不能小于 0',
|
||||
'weight.numeric' => '称重必须为数字',
|
||||
'weight.min' => '称重不能小于 0',
|
||||
'publish_amount.numeric' => '公布金额必须为数字',
|
||||
'publish_amount.min' => '公布金额不能小于 0',
|
||||
'actual_amount.numeric' => '实际金额必须为数字',
|
||||
'actual_amount.min' => '实际金额不能小于 0',
|
||||
];
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user