allocatr/application/worker/validate/OrderAbnormal.php
2025-04-20 22:51:50 +08:00

26 lines
651 B
PHP

<?php
namespace app\worker\validate;
use think\Validate;
class OrderAbnormal extends Validate
{
protected $rule = [
'abnormal_id|异常原因' => 'require|number',
'order_id|订单id' => 'require|number',
'detail|异常详情' => 'require|max:200',
];
protected $message = [
'abnormal_id.require' => '请选择异常原因',
'detail.require' => '异常说明不能为空',
'detail.max' => '异常说明不能超过 200 个字',
];
protected $scene = [
'create' => ['abnormal_id', 'order_id', 'detail'],
'info' => ['order_id'],
];
}