Trim whitespace from account email address when trying to register/login
m-rey opened this issue · 1 comments
m-rey commented
I noticed while logging in as a hood admin that whitespace before and after the email address doesn't get trimmed. Thus you can't login if there's whitespace.
Why does this matter? It matters, because for example many mobile keyboards with autocorrect and autosuggest automatically add a space after the text. so typing in foo@bar.xyz
results in foo@bar.xyz
being entered, which then results in the hood admin not being able to login and wondering what is wrong.
acipm commented
There are different ways to solve this:
- write a custom angular validator that gives the users feedback that there is whitespace
- Or if that did not work try to trim the whitespace before sending the http request.
Either way, you can find the register and login components here:
- Register: https://github.com/acipm/kibicara/tree/development/kibicara-frontend/src/app/auth/register
- Login: https://github.com/acipm/kibicara/tree/development/kibicara-frontend/src/app/auth/login
Tbh I don't think this is a very big issue.