Welcome Guest, Not a member yet? Register   Sign In
Can't get the Form Validation library to work
#2

[eluser]runrun[/eluser]
After loading the validation class and setting rule (you sure did this) You should have this in your controller

Code:
$this->form_validation->set_error_delimiters('<span class="error">', '</span>');

And you should have this in your view file in order to display respective errors to respective form fields.
Code:
&lt;input type="text" name="username"/&gt;
<span>&lt;?=form_error('username')</span>;
&lt;input type="text" name="email" /&gt;
<span>&lt;?=form_error('email')?&gt;</span>


Messages In This Thread
Can't get the Form Validation library to work - by El Forum - 12-15-2009, 04:05 AM
Can't get the Form Validation library to work - by El Forum - 12-15-2009, 04:21 AM
Can't get the Form Validation library to work - by El Forum - 12-15-2009, 04:26 AM
Can't get the Form Validation library to work - by El Forum - 12-15-2009, 08:11 AM
Can't get the Form Validation library to work - by El Forum - 12-15-2009, 08:38 AM



Theme © iAndrew 2016 - Forum software by © MyBB