Yes, but you are using quotes for the set_rules label field
PHP Code:
$this->form_validation->set_rules('xname','Xname','trim|required');
$this->form_validation->set_rules('xemail','Xemail','trim|valid_email');
But like I mentioned if it will not work then you will need to trim the fields before inserting them into the database.
What did you Try? What did you Get? What did you Expect?
Joined CodeIgniter Community 2009. ( Skype: insitfx )