Welcome Guest, Not a member yet? Register   Sign In
trim|valid_email not working in validation
#1

PHP Code:
$this->form_validation->set_rules('xname','','trim|required');
$this->form_validation->set_rules('xemail','','trim|valid_email'); 

Hi, in the above code the first line is trimming 'xname' as expected. But the second line to not remove spaces in the beginning of 'xemail'. I get validation success and I insert the data in a database. When looking in the database the spaces are still there in the beginning of the 'xemail' but gone in 'xname'.  Any idea what is causing this?
Reply


Messages In This Thread
trim|valid_email not working in validation - by 040mag - 01-07-2018, 04:34 AM



Theme © iAndrew 2016 - Forum software by © MyBB