That works great thanks! I also made the following change to the email
stripping validation. Otherwise it was having problems with carriage
returns and newlines in the email_addresses field.
- emails = email_addresses.split(",").collect{|email|
email.strip }.uniq
+ emails = email_addresses.gsub(/\r\n?/, '').split(",").collect{|
email| email.strip }.uniq
Don't forget the same function is used in send_invite so it has to be
changed there too.
Cheers,
--
Barry
On Jan 26, 2:47 pm, moritz <[email protected]> wrote:
> The validation for invitation emails would be improved by changing
>
> unlessemail=~ /[\w._%...@[\w.-]+.[a-za-z]{2,4}/
>
> to
>
> unlessemail=~ /^[\w._%...@[\w.-]+.[a-za-z]{2,4}$/
>
> Otherwise emails such as "#!%& [email protected] #$^()" pass. I've
> tried it onhttp://rubular.com/
--
You received this message because you are subscribed to the Google Groups
"CommunityEngine" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/communityengine?hl=en.