Yii Trim Tutorials

Trim Function in Yii Model

From my sourcecode, I gave the information for trim function in yii framework. When we update the record, This function will apply to all fields. <?php class User extends CActiveRecord { public static function model($className=__CLASS__) { return parent::model($className); } public function tableName() { return 'tbl_user'; } public function rules() { array('username, password, firstname, lastname, email, address', 'filter', 'filter'=>'trim'), } } ?>... Read More »