Trim spaces when pasting email address in share dialog

The email is valid, but the “Send Invite” button is disabled. The problem is pretty self explanatory.

It would be nice if the input automatically trimmed restricted characters and/or showed an error telling me what the issue is.

Here’s a screenshot of the issue.