Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

fix email regex example code [ci skip]

different from the regex in EmailValidator
  • Loading branch information...
commit f590cdb6561f2c049c73a40815a46a7fef469aa2 1 parent 6eba8d2
@acapilleri acapilleri authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  activemodel/lib/active_model/validations/validates.rb
View
2  activemodel/lib/active_model/validations/validates.rb
@@ -13,7 +13,7 @@ module ClassMethods
# validates :terms, acceptance: true
# validates :password, confirmation: true
# validates :username, exclusion: { in: %w(admin superuser) }
- # validates :email, format: { with: /\A([^@\s]+)@((?:[-a-z0-9]+\.)+[a-z]{2,})\Z/i, on: :create }
+ # validates :email, format: { with: /\A([^@\s]+)@((?:[-a-z0-9]+\.)+[a-z]{2,})\z/i, on: :create }
# validates :age, inclusion: { in: 0..9 }
# validates :first_name, length: { maximum: 30 }
# validates :age, numericality: true
Please sign in to comment.
Something went wrong with that request. Please try again.