trim() isn't being done on the inputted value.

not sure if it was by design or just missed, but I'd implement that if it were me.