diaspora/diaspora — pull request #3748 by rschaden (2012-11-20 10:51:23+00:00)
Title: 3271 invitation email validation

For validating emails we used the Regexp '\b[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,4}\b'
taken from http://www.regular-expressions.info/email.html. If you want a different expression just let me know.
The entered emails are split according to this validation method. The correct ones are delivered anyway and a notice/error informs the user about the status.
Valid/Invalid Emails are stored in session variables that are used to repopulate the form. Invalid emails are put in the input field while valid ones appear just below with a notice. We've added two definitions to the locales/diaspora/en.yml file for use in flash messages/form.
The session variables are cleared after the first request to InvitationsController#new.

Please let me now if you have any questions/if there are improvements I should implement.