Validation library question

#1
[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.

#2
[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.

#3
[eluser]EugeneS[/eluser]
yep ...

those not required fields were not listed in $set_fields

Thanks.


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.