Method chaining support for FV set_data(), reset_validation()
diff --git a/system/libraries/Form_validation.php b/system/libraries/Form_validation.php
index 5848591..7c44140 100644
--- a/system/libraries/Form_validation.php
+++ b/system/libraries/Form_validation.php
@@ -252,7 +252,7 @@
* each array due to the limitations of CI's singleton
*
* @param array $data
- * @return void
+ * @return CI_Form_validation
*/
public function set_data(array $data)
{
@@ -260,6 +260,8 @@
{
$this->validation_data = $data;
}
+
+ return $this;
}
// --------------------------------------------------------------------
@@ -1536,7 +1538,7 @@
* Prevents subsequent validation routines from being affected by the
* results of any previous validation routine due to the CI singleton.
*
- * @return void
+ * @return CI_Form_validation
*/
public function reset_validation()
{
@@ -1545,6 +1547,7 @@
$this->_error_array = array();
$this->_error_messages = array();
$this->error_string = '';
+ return $this;
}
}