Welcome Guest, Not a member yet? Register   Sign In
Simple user login - How to set errors after validation is ran
#3

[eluser]Unknown[/eluser]
After the validation is ran, I set a variable inside the form_validation property:

Code:
$this->form_validation->_my_custom_error_list['my_error_element'] = 'My Info';

Then, in the place I need to print my error, I evaluate if that variable exists:

Code:
if( isset( $this->form_validation->_my_custom_error_list['my_error_element'] ) ) {
    echo '<span class="error">my_error_element has an error!!!</span>';
}

Not a nice way, but it solved my problem.


Messages In This Thread
Simple user login - How to set errors after validation is ran - by El Forum - 03-04-2011, 03:42 PM



Theme © iAndrew 2016 - Forum software by © MyBB