Sha256: b1f5a50bf1fffe04a98580d01fee10da4f095bee4d8350905876d34803ab234e

Contents?: true

Size: 630 Bytes

Versions: 6

Compression:

Stored size: 630 Bytes

Contents

# IP address

#### Rules

```ruby
# 1. Pattern
:ipv4 => Resolv::IPv4::Regex
:ipv6 => Resolv::IPv6::Regex
```

#### Options

Option | Type | Available | Default
--- | --- | --- | ---
protocol | symbol | any, ipv4, ipv6 | any
include_address | array, string, symbol | |
exclude_address | array, string, symbol | |

#### Usage

```ruby
class User < ActiveRecord::Base

  validates :input0, ip_address: true
  validates :input1, ip_address: { protocol: :ipv4 }
  validates :input2, ip_address: { include_address: ['0.0.0.0', '99.39.240.31'] }
  validates :input3, ip_address: { exclude_address: ['0.0.0.0', '99.39.240.31'] }

end
```

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
lite-validators-1.8.0 docs/IP_ADDRESS.md
lite-validators-1.7.2 docs/IP_ADDRESS.md
lite-validators-1.7.1 docs/IP_ADDRESS.md
lite-validators-1.7.0 docs/IP_ADDRESS.md
lite-validators-1.6.0 docs/IP_ADDRESS.md
lite-validators-1.5.0 docs/IP_ADDRESS.md