CodeIgniter Forums
Validation library question - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived General Discussion (https://forum.codeigniter.com/forumdisplay.php?fid=21)
+--- Thread: Validation library question (/showthread.php?tid=7659)



Validation library question - El Forum - 04-17-2008

[eluser]EugeneS[/eluser]
Hi,

i have a question according to the validation library:

lets say i have 2 fields in the form one is required another one not
Code:
$rules['Phone']    = 'trim|required';
$rules['Company'] = 'trim';

$this->validation->set_rules($rules);

$valid_result = $this->validation->run();

after the validation, required field is accessible through the
$this->validation->Phone;
but not required field not accesible as $this->validation->Company;

my question is whats wrong and why the second one not accessible ? :\
i'm using not the latest version, might be in the latest version this was fixed ?

as i saw CI 1.6.1 Validation class still not support UTF8 ?
so if that problem with required/not required fields was fixed in 1.6.1 i have to rewrite Validation library to support UTF8 again, if problem wasnt fixed i wont rewrite it Smile

Thanks.


Validation library question - El Forum - 04-17-2008

[eluser]sikkle[/eluser]
humm i use the library withouth any problem so many time, so it's weird, maybe give a look to $set_fields
, but humm this just work.

re-test man, re-test.


Validation library question - El Forum - 04-17-2008

[eluser]EugeneS[/eluser]
yep ...

those not required fields were not listed in $set_fields

Thanks.