Welcome Guest, Not a member yet? Register   Sign In
Private function and Custom form validation
#10

[eluser]InsiteFX[/eluser]
Code:
array(
     'field' => 'check_terms',
     'label' => 'Terms of service',
     'rules' => 'callback__check_terms' // double underscore
)

Code:
public function _check_terms($terms=0){
     if ($terms != 'agree')
     {
          $this->form_validation->set_message('_check_terms', 'The terms of service must be read and agreed to before continuing.'); // according to CroNiX
          return FALSE;
     }
     else
     {
          return TRUE;
     }
}


Messages In This Thread
Private function and Custom form validation - by El Forum - 07-08-2012, 09:23 AM
Private function and Custom form validation - by El Forum - 07-08-2012, 09:47 AM
Private function and Custom form validation - by El Forum - 07-08-2012, 09:51 AM
Private function and Custom form validation - by El Forum - 07-08-2012, 09:52 AM
Private function and Custom form validation - by El Forum - 07-08-2012, 09:54 AM
Private function and Custom form validation - by El Forum - 07-08-2012, 09:55 AM
Private function and Custom form validation - by El Forum - 07-08-2012, 09:57 AM
Private function and Custom form validation - by El Forum - 07-08-2012, 09:58 AM
Private function and Custom form validation - by El Forum - 07-08-2012, 10:02 AM
Private function and Custom form validation - by El Forum - 07-08-2012, 10:03 AM
Private function and Custom form validation - by El Forum - 07-08-2012, 10:03 AM
Private function and Custom form validation - by El Forum - 07-08-2012, 10:08 AM
Private function and Custom form validation - by El Forum - 07-08-2012, 10:17 AM



Theme © iAndrew 2016 - Forum software by © MyBB