Welcome Guest, Not a member yet? Register   Sign In
Form Validation validating blank values with min_length and valid_email rules
#2

(This post was last modified: 10-16-2017, 07:08 AM by dave friend.)

The easiest thing is to add required to the set of rules.
PHP Code:
$this->form_validation->set_rules([
  [
   'field' => 'username',
   'label' => 'Username',
   'rules' => 'required|min_length[5]|max_length[32]',
  ],
  [
 
    'field' => 'email',
 
    'label' => 'Email',
 
    'rules' => 'required|valid_email',
 
  ],
]); 
Reply


Messages In This Thread
RE: Form Validation validating blank values with min_length and valid_email rules - by dave friend - 10-16-2017, 07:08 AM



Theme © iAndrew 2016 - Forum software by © MyBB