Form_validation_CI
$this->load->library('form_validation');
$this->form_validation->set_rules('first_name', 'User Name', 'trim|required|min_length[4]|max_length[15]|xss_clean');
$this->form_validation->set_rules('last_name', 'Last Name', 'trim|required|xss_clean');
$this->form_validation->set_rules('email_address', 'Email Address', 'trim|required|valid_email|xss_clean');
$this->form_validation->set_rules('username', 'User Name', 'trim|required|min_length[4]|xss_clean');
$this->form_validation->set_rules('password', 'Password', 'trim|required|min_length[6]|max_length[32]|xss_clean');
$this->form_validation->set_rules('password2', 'Password Confirmation', 'trim|required|matches[password]');