mirror of
https://gitee.com/fastadminnet/framework.git
synced 2026-07-07 23:22:48 +08:00
增加 判断是否存在某个场景的验证配置
在做验证通用操作功能封装的时候,可以根据需要,是否启用场景验证
This commit is contained in:
@@ -216,6 +216,17 @@ class Validate
|
|||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 判断是否存在某个验证场景
|
||||||
|
* @access public
|
||||||
|
* @param string $name 场景名
|
||||||
|
* @return bool
|
||||||
|
*/
|
||||||
|
public function hasScene($name)
|
||||||
|
{
|
||||||
|
return isset($this->scene[$name]);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 设置批量验证
|
* 设置批量验证
|
||||||
* @access public
|
* @access public
|
||||||
|
|||||||
Reference in New Issue
Block a user