Saturday, 31 May 2014

Unnecessary user pain on sites that fail to strip spaces

I just have to vent my intense anger with sites that fail to strip spaces when entering simple information like email addresses, user ids and similar. Surely it is universally accepted that spaces cannot be part of login names, email addresses, web page links and such. Indeed this is used by the vast majority of auto-completion tools on smartphone, tablet/laptop to terminate the insert action. You start typing an oft-entered text sequence and the platform prompts with the suggested complete text, and you accept by typing a space. Any other character kills the autocomplete action.

Annoyingly I am seeing more and more sites returning the unhelpful message
Not a valid email address/login name/...
when a trailing space appears after the text entry. Every person who claims to be a web developer should know the scripting/coding language they use to accept the user's input has a built-in library function akin to trim() which stips spaces and other invalid characters. Every site should do this.

This exasperated post was triggered by trying my hand at the tempting article entitled 'Could You Win the National Spelling Bee? - Test Yourself With These Winning Words'. I accidentally (yeah!) typed an answer ending with a space and was incensed at receiving an 'incorrect' answer. Of course it was my trusty Swiftkey keyboard app on the Nexus 7 that actually entered the correct answer but added a space.

Please, all sites accepting atomic text input should be stripping leading and trailing spaces. It shows sloppy coding otherwise and lowers the trustworthiness of the site.