I am using trim function in a controller so login field can't contain whitespaces at the end but It doesn't work. The login is saved with white spaces.
here is the code.
$crud = new grocery_CRUD(); $crud->set_table('users'); $crud->set_subject('Usuario'); $crud->columns('login','password','admin'); $crud->fields('login','password','admin'); $crud->display_as('login','Usuario'); $crud->set_rules('login','Usuario','trim|required'); $crud->set_rules('password','Clave','required');
what is wrong? or do I have to use a callback?