I added trim filter in model
In form
When i gave this type of input " yii " [space in front], The below error is occured
Error:
CDbCommand failed to execute the SQL statement: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry 'Visitors' for key 'name'. The SQL statement executed was: INSERT INTO `visitors_type` (`name`, `isactive`) VALUES (:yp0, :yp1)
array('name','unique'), array('name','filter','filter'=>'trim'),
In form
When i gave this type of input " yii " [space in front], The below error is occured
Error:
CDbCommand failed to execute the SQL statement: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry 'Visitors' for key 'name'. The SQL statement executed was: INSERT INTO `visitors_type` (`name`, `isactive`) VALUES (:yp0, :yp1)