Welcome Guest, Not a member yet? Register   Sign In
form validation error
#1

[eluser]Blaskunk[/eluser]
Hello world !!

I work on a website in codeigniter of course.

I search a method to print an error of a field of a form.

My fields is generate automatically with a buckle for like that:
for($i=1;$i<$num_dest;$i++)
echo "&lt;input id='field".$i."'&gt;";

Of course, the rules and fields sets are corrects.
Only the write errors don't work.

The version of my codeigniter used only allow me to use this syntax:
$this->validation->field_error;

Obviously, i can't use $this->validation->field$i_error;

I find this syntax but isn't work :
$objectName = 'this'; //case sensitive.
$anotherObject = 'validation';//case sensitive
$functionName = 'field'.$i;

echo $$objectName->{$anotherObject}->{$functionName}();

Would come out the right syntax to do that ?
Please help, thank's in advance

PS : sorry for my grammar' errors.


Messages In This Thread
form validation error - by El Forum - 07-29-2010, 03:23 AM
form validation error - by El Forum - 07-29-2010, 09:56 AM
form validation error - by El Forum - 07-29-2010, 05:53 PM
form validation error - by El Forum - 07-29-2010, 07:23 PM
form validation error - by El Forum - 07-30-2010, 02:23 AM
form validation error - by El Forum - 07-30-2010, 11:28 AM



Theme © iAndrew 2016 - Forum software by © MyBB