Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $this->form_validation->set_rules('username', 'Username', 'required|_max_length[12]');
- function _max_length($val)
- {
- if (strlen($this->input->post('username')) > $val)
- {
- $this->form_validation->set_message('_max_length', 'Max characters allowed: 5')
- return FALSE;
- }
- return TRUE;
- }
- $this->form_validation->set_message('username_check', 'The %s field can not be the word "test"');
- $this->form_validation->set_message('max_length', 'The field %s max length is %s');
- $this->form_validation->set_message('validation_rule', 'Your message here');
- $this->form_validation->set_message('max_length', 'Max characters allowed: 5');
Add Comment
Please, Sign In to add comment