// +---------------------------------------------------------------------- namespace app\validate\merchant; use think\Validate; class OpenAuthValidate extends Validate { protected $failException = true; protected $rule = [ 'title|标题' => 'require', 'auth|权限' => 'require|checkAuth', ]; public function checkAuth() { return true; } public function sceneEdit() { return $this->only(['title','auth']); } }