diff options
author | Angelo capilleri <capilleri@yahoo.com> | 2013-12-03 16:40:04 +0100 |
---|---|---|
committer | Angelo capilleri <capilleri@yahoo.com> | 2013-12-03 16:44:39 +0100 |
commit | f590cdb6561f2c049c73a40815a46a7fef469aa2 (patch) | |
tree | b425f35857cbe1cd4f4048cc726e293928f6f6f6 /activemodel | |
parent | 6eba8d27e6feecca88303df6500ef6b376344e29 (diff) | |
download | rails-f590cdb6561f2c049c73a40815a46a7fef469aa2.tar.gz rails-f590cdb6561f2c049c73a40815a46a7fef469aa2.tar.bz2 rails-f590cdb6561f2c049c73a40815a46a7fef469aa2.zip |
fix email regex example code [ci skip]
different from the regex in EmailValidator
Diffstat (limited to 'activemodel')
-rw-r--r-- | activemodel/lib/active_model/validations/validates.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/activemodel/lib/active_model/validations/validates.rb b/activemodel/lib/active_model/validations/validates.rb index 9a1ff2ad39..bf588b7bd0 100644 --- a/activemodel/lib/active_model/validations/validates.rb +++ b/activemodel/lib/active_model/validations/validates.rb @@ -13,7 +13,7 @@ module ActiveModel # 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 |