Ensure that whitespace doesn't cause adding members to fail
I recently had to debug an issue where adding users wasn't working. It turned out that I was hitting "space" to confirm a select2
dialog, and the server would throw out the whole email address because it was invalid. It looked as though GitLab was entirely ignoring my add-member request.
Ideally, there should also be validation client-side, so that the server doesn't need to silently fail, and the user will know what's going wrong. I'll look into creating an issue for that.
Additionally, GitLab already seems to trim email addresses, sometimes? If you add two address, with spaces, then the value
of the user_ids
DOM element will have the first n-1
addresses without spaces. Weird.
TL;DR: Now spaces are always trimmed from new-member email addresses.