zx/app/validate/merchant/MerchantFinancialAccountVal...

51 lines
1.7 KiB
PHP
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<?php
// +----------------------------------------------------------------------
// | CRMEB [ CRMEB赋能开发者助力企业发展 ]
// +----------------------------------------------------------------------
// | Copyright (c) 2016~2022 https://www.crmeb.com All rights reserved.
// +----------------------------------------------------------------------
// | Licensed CRMEB并不是自由软件未经许可不能去掉CRMEB相关版权
// +----------------------------------------------------------------------
// | Author: CRMEB Team <admin@crmeb.com>
// +----------------------------------------------------------------------
namespace app\validate\merchant;
use think\Validate;
class MerchantFinancialAccountValidate extends Validate
{
protected $failException = true;
/*
{
"financial_type":2,
"name":"王二小",
"idcard":"",
"wechat":"1",
"wechat_code":"456461516"
}
{
"financial_type":3,
"name":"王二小",
"idcard":"",
"alipay":"1",
"alipay_code":"456461516"
}
*/
protected $rule = [
'financial_type|转账类型' => 'require|in:1,2,3',
'name|姓名' => 'require|chs',
'bank|开户银行' => 'requireIf:financial_type,1',
'bank_code|银行卡号' => 'requireIf:financial_type,1',
//'idcard|身份证号' => 'requireIf:financial_type,2,3|idCard',
'wechat|微信号' => 'requireIf:financial_type,2',
'wechat_code|微信收款二维码' => 'requireIf:financial_type,2',
'alipay|支付宝账号' => 'requireIf:financial_type,3',
'alipay_code|收款二维码' => 'requireIf:financial_type,3',
];
}