update
This commit is contained in:
@@ -36,7 +36,6 @@ class PrescriptionOrderValidate extends BaseValidate
|
||||
'patient_name' => 'require|max:50',
|
||||
'phone' => 'require|max:20',
|
||||
'phone_tail' => 'max:20|regex:/^\\d*$/',
|
||||
'amount_update' => 'require|float|gt:0',
|
||||
];
|
||||
|
||||
protected $message = [
|
||||
@@ -51,8 +50,6 @@ class PrescriptionOrderValidate extends BaseValidate
|
||||
'patient_name.require' => '请输入患者姓名',
|
||||
'phone.require' => '请输入手机号',
|
||||
'phone_tail.regex' => '手机后四位仅支持数字',
|
||||
'amount_update.require' => '请输入订单金额',
|
||||
'amount_update.gt' => '订单金额必须大于0',
|
||||
];
|
||||
|
||||
protected $scene = [
|
||||
@@ -80,6 +77,13 @@ class PrescriptionOrderValidate extends BaseValidate
|
||||
'submitGancaoRecipel' => ['id'],
|
||||
'previewGancaoRecipel' => ['id'],
|
||||
'patchPrescriptionPatient' => ['id', 'patient_name', 'phone'],
|
||||
'updateAmount' => ['id', 'amount_update'],
|
||||
'updateAmount' => ['id', 'amount'],
|
||||
];
|
||||
|
||||
public function updateAmount(): PrescriptionOrderValidate
|
||||
{
|
||||
return $this->only(['id', 'amount'])
|
||||
->append('id', 'require|integer|gt:0')
|
||||
->append('amount', 'require|float|gt:0');
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user