sstephenson/global_phone — pull request #10 by locochris (2013-08-10 12:58:29+00:00)
Title: Add global_phone validator

Validate global phone numbers in Rails 3.x and ActiveModel.

```ruby
class Person < ActiveRecord::Base
validates :home_phone, :global_phone => true
end

Person.new(home_phone: '+61 3 9876 0010').valid?
# => true

class User < ActiveRecord::Base
validates :work_phone, :global_phone => { :using => :work_country_code }

def work_country_code
'AU'
end
end

User.new(work_phone: '03 9876 0010').valid?
# => true
```