daily pastebin goal
53%
SHARE
TWEET

Untitled

a guest Apr 16th, 2018 46 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. $this->form_validation->set_rules('username', 'Username', 'required|_max_length[12]');
  2.    
  3. function _max_length($val)
  4.     {
  5.         if (strlen($this->input->post('username')) > $val)
  6.         {
  7.                     $this->form_validation->set_message('_max_length', 'Max characters allowed: 5')
  8.             return FALSE;
  9.         }
  10.  
  11.         return TRUE;
  12.     }
  13.    
  14. $this->form_validation->set_message('username_check', 'The %s field can not be the word "test"');
  15.    
  16. $this->form_validation->set_message('max_length', 'The field %s max length is %s');
  17.    
  18. $this->form_validation->set_message('validation_rule', 'Your message here');
  19.    
  20. $this->form_validation->set_message('max_length', 'Max characters allowed: 5');
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top