Welcome Guest, Not a member yet? Register   Sign In
Validating groups of inputs
#10

[eluser]Ihab Khattab[/eluser]
You can show errors Individually using form_error()

http://ellislab.com/codeigniter/user-gui...dualerrors

for example above your groups you would write

Code:
<?php echo form_error(); ?>

3 times, every time you pass your group name so if there is an error in group it would echo it if there is no error it won't show any thing

and next to each input you would write
Code:
<?php echo form_error(); ?>
passing each input name to it

but I think you still should use arrays as input names so you can use form_error('comb1[]') for a group and use form_error('comb1[n]') to echo it next to input.and also using it to set your rules

I'll try to write some code to make things clearer


Messages In This Thread
Validating groups of inputs - by El Forum - 07-27-2010, 07:43 AM
Validating groups of inputs - by El Forum - 07-27-2010, 02:24 PM
Validating groups of inputs - by El Forum - 07-28-2010, 07:44 AM
Validating groups of inputs - by El Forum - 07-28-2010, 10:13 AM
Validating groups of inputs - by El Forum - 07-29-2010, 02:41 AM
Validating groups of inputs - by El Forum - 07-29-2010, 05:12 AM
Validating groups of inputs - by El Forum - 07-29-2010, 05:40 AM
Validating groups of inputs - by El Forum - 07-29-2010, 06:16 AM
Validating groups of inputs - by El Forum - 07-29-2010, 06:46 AM
Validating groups of inputs - by El Forum - 07-29-2010, 07:32 AM



Theme © iAndrew 2016 - Forum software by © MyBB