Sha256: 8e9533591b1cd2054713824e792d8f51da1ba24f8abf7b16221a87f2064d8979

Contents?: true

Size: 1.04 KB

Versions: 2

Compression:

Stored size: 1.04 KB

Contents

# ValidatesHost [![Build Status](https://secure.travis-ci.org/plribeiro3000/validates_host.png?branch=master)](http://travis-ci.org/plribeiro3000/validates_host)

Rails gem to validate Host Related fields.

## Installation

Add this line to your application's Gemfile:

    gem 'validates_host'

And then execute:

    $ bundle

Or install it yourself as:

    $ gem install validates_host

## Usage

Lets say you have a model that you want to have valid host fields. Just add this to your model:

```ruby
class Server < ActiveRecord::Base
    validates :domain_name, :domain_name => true
    validates :host_name, :host_name => true
    validates :ip, :ip => true
end

class Subnet < ActiveRecord::Base
    validates :value, :subnet => true
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

2 entries across 2 versions & 1 rubygems

Version Path
validates_host-0.3.1 README.md
validates_host-0.3.0 README.md