Welcome Guest, Not a member yet? Register   Sign In
Form Validation
#2

[eluser]Kamarg[/eluser]
In system/application/MY_Form_validation.php
Code:
class MY_Form_validation extends CI_Form_validation {
    function clear_rules() {
        $this->_field_data  = array();
        $this->_error_array = array();
        $this->_error_messages = array();
    }
}

In your controller set the rules to check $_POST['email'] and run the validation. If you then need to run a different set of validation, call clear_rules() and set the new validation rules.


Messages In This Thread
Form Validation - by El Forum - 03-18-2010, 05:34 AM
Form Validation - by El Forum - 03-18-2010, 07:45 AM
Form Validation - by El Forum - 03-18-2010, 07:57 AM



Theme © iAndrew 2016 - Forum software by © MyBB