<?php

namespace app\workerapi\validate;
use app\common\validate\BaseValidate;
/**
 * @author 林海涛
 * @date 2024/7/11 下午4:30
 */
class BankAccountValidate extends BaseValidate
{
    protected $rule = [
        'account_holder' => 'require',
        'bank_name' => 'require',
        'province'=>'require',
        'city'=>'require',
        'opening_branch'=>'require',
        'account'=>'require',
        'mobile'=>'require|mobile',
        'bank_image'=>'require'
    ];

    protected $message = [
        'account_holder.require' => '请输入户主名称',
        'bank_name.require' => '请输入银行名称',
        'province.require' => '请输入省',
        'city.require' => '请输入市',
        'opening_branch.require' => '请输入开发支行',
        'account.require' => '请输入开发支行',
        'mobile.require' => '请输入银行卡预留手机号',
        'mobile.mobile' => '银行卡预留手机号格式不正确',
        'bank_image.require' => '请上传银行卡照片',
    ];

    public function sceneBindBankAccount()
    {
        $this->only(['account_holder','bank_name','province','city','opening_branch','account','mobile','bank_image']);
    }
}