• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Method "CI_Validation::set_fields()" for the new version class "CI_Form_validation" of the latest version CodeIgniter

#1
[eluser]pierrehs[/eluser]
Hello,
I'm trying to migrate my old site with the old version of CodeIgniter to the latest version (2.1).

But with the validation class, I would like to know what the new method similar to old class "CI_Validation::set_fields()" for the new class "CI_Form_validation"
Tthank you

#2
[eluser]Maulwurf[/eluser]
1.5 until 1.7.2 for example.
"Note: To display errors this way you must remember to set your fields using the $this->validation->set_fields function described earlier. The errors will be turned into variables that have "_error" after your field name. For example, your "username" error will be available at:
$this->validation->username_error."

from comparing the old and the new docs, I'd say, set_fields has gone and has merged into set_rules, which now takes 3 parameters instead of one.



Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


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