Sha256: 438dbc3ef39c403acca156a357efd6d9a46e16896fe9f5addd6feb75917066fc

Contents?: true

Size: 1.13 KB

Versions: 1

Compression:

Stored size: 1.13 KB

Contents

= ValidatesTelephone {<img src="https://secure.travis-ci.org/plribeiro3000/validates_telephone.png" />}[http://travis-ci.org/plribeiro3000/validates_telephone]

Rails gem to validate Telephone.

## Installation

Add this line to your application's Gemfile:

    gem 'validates_telephone'

And then execute:

    $ bundle

Or install it yourself as:

    $ gem install validates_telephone

== Basic Usage

It will accept a valid telephone from Brasil or United States by default:

```ruby
class User < ActiveRecord::Base
    validates :telephone, :telephone => true
end
```

In case you want it to be a valid telephone for just one place at a time, pass the locale:

```ruby
class User < ActiveRecord::Base
    validates :br_telephone, :telephone => { :locale => :br }
    validates :usa_telephone, :telephone => { :locale => :usa }
end
```

== Test

This gem has builtin matchers for shoulda-matchers and remarkable.

== Contributing

1. Fork it
2. Create your feature branch (`git checkout -b my-new-feature`)
3. Commit your changes (`git commit -am 'Added some feature'`)
4. Push to the branch (`git push origin my-new-feature`)
5. Create new Pull Request

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
validates_telephone-1.0.0 README.rdoc