tp3.2 的动态验证 范围验证

@yangweijie 2017-07-10 23:36:44发表于 yangweijie/note blogphpthinkphp

        $model = M();
        $rules = [
            ['a', '1,2', '不支持的商户经营类型',0, 'in'],
        ];
        $ret = $model->validate($rules)->create(['a'=>2]);
        dump($ret);
        die;

字段、范围值,提示,验证时间,in