Skip to content
This repository
Browse code

Allow capital letters in the email address in the the validates_forma…

…t_of example

git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2950 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
  • Loading branch information...
commit e6f412def3ec9defcc1a97d1d9c4a8880b18d624 1 parent 70521c8
Florian Weber authored November 09, 2005
2  activerecord/lib/active_record/validations.rb
@@ -500,7 +500,7 @@ def validates_uniqueness_of(*attr_names)
500 500
       # provided.
501 501
       #
502 502
       #   class Person < ActiveRecord::Base
503  
-      #     validates_format_of :email, :with => /^([^@\s]+)@((?:[-a-z0-9]+\.)+[a-z]{2,})$/, :on => :create
  503
+      #     validates_format_of :email, :with => /^([^@\s]+)@((?:[-a-z0-9]+\.)+[a-z]{2,})$/i, :on => :create
504 504
       #   end
505 505
       #
506 506
       # A regular expression must be provided or else an exception will be raised.

0 notes on commit e6f412d

Please sign in to comment.
Something went wrong with that request. Please try again.