采购单优化
This commit is contained in:
@@ -0,0 +1,32 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Requests\Purchase;
|
||||
|
||||
use Modules\Common\Http\Requests\BaseFormRequest;
|
||||
|
||||
/**
|
||||
* 采购明细门店单元格修改 验证(C4;amount = 数量×单价 由后端重算)
|
||||
*/
|
||||
class PurchaseCellUpdateRequest extends BaseFormRequest
|
||||
{
|
||||
protected $stopOnFirstFailure = true;
|
||||
|
||||
public function rules(): array
|
||||
{
|
||||
return [
|
||||
'quantity' => 'required|integer|min:0',
|
||||
'weight' => 'nullable|numeric|min:0',
|
||||
];
|
||||
}
|
||||
|
||||
public function messages(): array
|
||||
{
|
||||
return [
|
||||
'quantity.required' => '数量不能为空',
|
||||
'quantity.integer' => '数量必须为整数',
|
||||
'quantity.min' => '数量不能小于 0',
|
||||
'weight.numeric' => '实际称重必须为数字',
|
||||
'weight.min' => '实际称重不能小于 0',
|
||||
];
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user