A space is probably not the only character that should be avoided. A better way would be to validate the column name in the same way as Doctrine.