Skip to content

Commit

Permalink
Updated regexp for recipient_email to support multiple email addresses.
Browse files Browse the repository at this point in the history
  • Loading branch information
romul committed Oct 29, 2010
1 parent fde5878 commit 05d6060
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/models/mail_to_friend.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ class MailToFriend
validates :sender_name, :presence => true
validates :recipient_name, :presence => true
validates :sender_email, :format => { :with => /^[A-Z0-9._%+-]+@[A-Z0-9.-]+.[A-Z]{2,4}$/i }
validates :recipient_email, :format => { :with => /^[A-Z0-9._%+-]+@[A-Z0-9.-]+.[A-Z]{2,4}$/i }
validates :recipient_email, :format => { :with => /^([A-Z0-9._%+-]+@[A-Z0-9.-]+.[A-Z]{2,4}[,;]?\s?)+$/i }

def initialize(opts = {})
@sender_email = opts[:sender_email] || ' '
Expand Down

0 comments on commit 05d6060

Please sign in to comment.