fastadmin开启验证规则和验证场景
在相应的控制器中开启
class Staff extends Backend { protected $modelValidate = true; //开启验证规则 protected $modelSceneValidate = true; //开启验证场景 /** * Staff模型对象 * @var \app\admin\model\Staff */ protected $model = null; public function _initialize() { parent::_initialize(); $this->model = new \app\admin\model\Staff; // $this->modelValidate = new ValidateStaff(); }
╰︶﹉⋛⋋⊱⋋๑๑⋌⊰⋌⋚﹉︶╯