本文整理汇总了PHP中CI_Form_validation::reset_validation方法的典型用法代码示例。如果您正苦于以下问题:PHP CI_Form_validation::reset_validation方法的具体用法?PHP CI_Form_validation::reset_validation怎么用?PHP CI_Form_validation::reset_validation使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CI_Form_validation
的用法示例。
在下文中一共展示了CI_Form_validation::reset_validation方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: reset_validation
/**
* Reset validation vars
*
* Prevents subsequent validation routines from being affected by the results
* of any previous validation routine due to the CI singleton.
*
* This method can be removed when compatibility with CI 2 is no longer needed,
* as the method already exists in CI 3.
*
* @return $this
*/
public function reset_validation()
{
// Just in case the parent method changes at some point in the future.
if (substr(CI_VERSION, 0, 1) != '2') {
return parent::reset_validation();
}
$this->_field_data = array();
$this->_config_rules = array();
$this->_error_array = array();
$this->_error_messages = array();
$this->error_string = '';
return $this;
}
示例2: reset_validation
/**
* Reset validation vars
*
* Prevents subsequent validation routines from being affected by the
* results of any previous validation routine due to the CI singleton.
*
* @return CI_Form_validation
*/
public function reset_validation()
{
$this->error_string = '';
$this->request_method = '';
return parent::reset_validation();
}