• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Form_validation unset 'set_rules'

#3
[eluser]rufnex[/eluser]
Why not just validate B then A in every case?

Code:
// block B
$this->form_validation->set_rules('description', 'Description', 'required');
if ($this->form_validation->run() == TRUE) {
    // execute code for block B
}
// validation for block A
$this->form_validation->set_rules('responsible_user', 'Responsible_user', '');
if ($this->form_validation->run() == TRUE) {
    // execute code for block A
}




Messages In This Thread
Form_validation unset 'set_rules' - by El Forum - 10-21-2014, 01:23 AM
Form_validation unset 'set_rules' - by El Forum - 10-21-2014, 05:29 AM
Form_validation unset 'set_rules' - by El Forum - 10-21-2014, 10:56 AM

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


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