-
-
Notifications
You must be signed in to change notification settings - Fork 831
Ignore whitespace in email address check #5623
Conversation
for the case you copy & paste the email address you misses whitespaces
@dennisroczek, please include a sign off as described here |
for the case you copy & paste the email address you misses whitespaces Signed-off-by: dennisroczek <dennisroczek@libreoofice.org>
…eact-sdk into email-trim Signed-off-by: Dennis Roczek <dennisroczek@libreoffice.org>
err, I always miss the -s part :-/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm, I don't think we can accept as-is... There are various other components that call this same function which do not trim, so they would then have a confused idea of validity.
If you'd like to move forward here, I suggest visiting each component and checking how they should handle spaces.
@dennisroczek apologies for the delayed reply here - are you able to take a look at this still? |
Can I get the issue that we're solving coz the issue isn't linked, I tried to find it but I was not able to do so? |
There was no bug report. I found the bug myself and simply tried to fix it. Sadly, haven't the time at all to do anything. Feel free to overtake. |
Is it possible for you to add a video or screenshot or something? |
I think the testing steps for this would be to try to register an account with email, adding spaces to the end. |
Thanks, I'll do it and I'll create an issue for it first of all |
Would a simpler approach be to just tweak that form field in the UI so it ignores any attempts to input whitespace? As in, you press space and the field value doesn't change, you paste in a string containing spaces and the spaces get automatically removed. That should solve this issue without requiring code changes elsewhere, right? It also feels more syntactically correct in some ways; rather than accepting strings that aren't valid email addresses, we just force the input to be a valid email. |
Yeah, actually I didn't get the chance to look at it, I'll look at it now. This sounds a good idea to me I'll try to add some jquery or something like that so that even if the user enters the input it will convert it to null. |
We don't have a jquery dependency and wouldn't really want to add one to be honest - we can just keep |
Ok! I'll go with |
I've raised the PR which solves this issue and is the continuation of this PR. |
Closing in favour of #9027 |
for the case you copy & paste the email address you misses whitespaces. A trim is already integrated in the RegistrationForm.
Here's what your changelog entry will look like:
✨ Features