erp_old/app/admin/validate/merchant/MerchantBankValidate.php

75 lines
1.3 KiB
PHP
Raw Normal View History

2024-05-13 16:03:16 +08:00
<?php
namespace app\admin\validate\merchant;
use app\common\validate\BaseValidate;
/**
* MerchantBank验证器
* Class MerchantBankValidate
* @package app\admin\validate\merchant
*/
class MerchantBankValidate extends BaseValidate
{
/**
* 设置校验规则
* @var string[]
*/
protected $rule = [
'id' => 'require',
'is_check' => 'require|in:1,2',
'fail_msg' => 'requireIf:is_check,2'
];
/**
* 参数描述
* @var string[]
*/
protected $field = [
'id' => 'id',
'is_check' => '审核状态',
'fail_msg' => '失败原因'
];
/**
* @notes 编辑场景
* @return MerchantBankValidate
* @author likeadmin
* @date 2024/05/13 15:06
*/
public function sceneEdit()
{
return $this->only(['id','is_check','fail_msg']);
}
/**
* @notes 删除场景
* @return MerchantBankValidate
* @author likeadmin
* @date 2024/05/13 15:06
*/
public function sceneDelete()
{
return $this->only(['id']);
}
/**
* @notes 详情场景
* @return MerchantBankValidate
* @author likeadmin
* @date 2024/05/13 15:06
*/
public function sceneDetail()
{
return $this->only(['id']);
}
}