/**
* 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;
}