<?php

namespace app\validate\saas;

use think\Validate;

class CardValidate extends Validate
{



    protected $rule = [
        "user_name"     => "require",
        "cert_id"       => "require|idCard",
        "tel_no"        => "require|mobile",
        "card_id"       => "require",
        "valid_from"    => "require",
        "valid_until"   => "require",
        "card_prov_code"    => "require",
        "card_area_code"    => "require",
        "card_city_name"    => "require",
    ];


    protected $message = [
        "user_name.require"     => "请输入姓名",
        "cert_id.require"       => "请输入身份证号",
        "tel_no.require"        => "请输入手机号码",
        "cert_id.idCard"        => "身份证号有误",
        "tel_no.mobile"         => "手机号有误",
        "card_id.require"       => "请输入银行卡号",
        "valid_from.require"    => "请选择身份证日期",
        "valid_until.require"   => "请选择身份证日期",
        "card_prov_code.require" => "请选择开户地区",
        "card_area_code.require" => "请选择开户地区",
        "card_city_name.require" => "请选择开户地区"
    ];
    protected $scene = [
        'add'  =>  ['user_name','cert_id','tel_no','card_id','valid_from','valid_until','card_prov_code','card_area_code','card_city_name'],
    ];

}