<?php
namespace app\validate;

use think\Validate;

class StaffValidate extends Validate
{
    protected $rule = [
        'account_id|微信绑定'       => 'require|gt:0',
        'phone|手机号'             => 'require|mobile',
        'name|姓名'               => 'require|chs',
        'dept_name|所属部门'        => 'max:200',
        'account_roles'             => 'max:300',

    ];


    protected $scene = [
        // 添加
        'add' => ['account_id', 'phone', 'name', 'dept_name', 'account_roles'],
        // 编辑
        'edit' => ['phone', 'name', 'dept_name', 'account_roles'],
    ];
}