Fixed #165 Stop using `trim` when validating, with thanks to Zegnat