fix for inputs losing has-error class after focus was removed
forgot about jquery having a trim method already. removing some unnecessary code