Update validates_formatting_of dependency to version 0.4.0
Add validation for phone numbers.
This commit is contained in:
parent
ae805e9163
commit
0cd8307c36
|
@ -1,6 +1,6 @@
|
||||||
GIT
|
GIT
|
||||||
remote: git://github.com/sferik/rails_admin.git
|
remote: git://github.com/sferik/rails_admin.git
|
||||||
revision: 086cfed1481bd9551262cbd4814a7fc260985cad
|
revision: 4e3014605b734f28942db836a2fc78692af05b10
|
||||||
specs:
|
specs:
|
||||||
rails_admin (0.0.1)
|
rails_admin (0.0.1)
|
||||||
bbenezech-nested_form (~> 0.0)
|
bbenezech-nested_form (~> 0.0)
|
||||||
|
@ -164,7 +164,7 @@ GEM
|
||||||
uglifier (1.2.1)
|
uglifier (1.2.1)
|
||||||
execjs (>= 0.3.0)
|
execjs (>= 0.3.0)
|
||||||
multi_json (>= 1.0.2)
|
multi_json (>= 1.0.2)
|
||||||
validates_formatting_of (0.3.7)
|
validates_formatting_of (0.4.0)
|
||||||
rails (~> 3.0)
|
rails (~> 3.0)
|
||||||
warden (1.1.0)
|
warden (1.1.0)
|
||||||
rack (>= 1.0)
|
rack (>= 1.0)
|
||||||
|
|
|
@ -5,6 +5,8 @@ class User < ActiveRecord::Base
|
||||||
:password, :password_confirmation, :remember_me, :sms_number, :state,
|
:password, :password_confirmation, :remember_me, :sms_number, :state,
|
||||||
:voice_number, :zip
|
:voice_number, :zip
|
||||||
validates_format_of :email, :with => /\A([^@\s]+)@((?:[-a-z0-9]+\.)+[a-z]{2,})\Z/i
|
validates_format_of :email, :with => /\A([^@\s]+)@((?:[-a-z0-9]+\.)+[a-z]{2,})\Z/i
|
||||||
|
validates_formatting_of :sms_number, :using => :us_phone, :allow_blank => true
|
||||||
|
validates_formatting_of :voice_number, :using => :us_phone, :allow_blank => true
|
||||||
validates_formatting_of :zip, :using => :us_zip, :allow_blank => true
|
validates_formatting_of :zip, :using => :us_zip, :allow_blank => true
|
||||||
validates_presence_of :name
|
validates_presence_of :name
|
||||||
has_many :reminders_to, :class_name => "Reminder", :foreign_key => "to_user_id"
|
has_many :reminders_to, :class_name => "Reminder", :foreign_key => "to_user_id"
|
||||||
|
|
Loading…
Reference in New Issue