$this->form_validation->set_rules(
'new-password',
'password',
'trim|required|min_length[8]',
array(
'required' => lang('error_empty_reg_password'),
'min_length' => lang('error_reg_min_length_password')
)
);
$lang[“error_reg_min_length_password“] = “Min length for field %s is %s characters”;