Permalink
Browse files

Adds ' as a valid character before the @ in as email address.

  • Loading branch information...
1 parent 8dccd51 commit 905f554cc11822a4f5164d54ef15bc4b4bd5c578 @mscottford committed Mar 6, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 core/app/models/order.rb
View
2 core/app/models/order.rb
@@ -28,7 +28,7 @@ class Order < ActiveRecord::Base
after_create :create_tax_charge!
# TODO: validate the format of the email as well (but we can't rely on authlogic anymore to help with validation)
- validates :email, :presence => true, :format => /^([\w\.%\+\-]+)@([\w\-]+\.)+([\w]{2,})$/i, :if => :require_email
+ validates :email, :presence => true, :format => /^([\w\.%\+\-\']+)@([\w\-]+\.)+([\w]{2,})$/i, :if => :require_email
validate :has_available_shipment
#delegate :ip_address, :to => :checkout

0 comments on commit 905f554

Please sign in to comment.