Sha256: 6a831dbdf4ec2ee8b7b31c95ebb7f91c2d0ba5992da56c09ed58001c2a274332

Contents?: true

Size: 442 Bytes

Versions: 13

Compression:

Stored size: 442 Bytes

Contents

# Boolean

#### Rules

```ruby
# 1. Pattern
'true_values'  => [true, 1, '1', 't', 'T', 'true', 'TRUE']
'false values' => [false, 0, '0', 'f', 'F', 'false', 'FALSE']
```

#### Options

Option | Type | Available | Default
--- | --- | --- | ---
check | symbol | all, false_only, true_only | all

#### Usage

```ruby
class User < ActiveRecord::Base

  validates :input0, boolean: true
  validates :input1, boolean: { check: :true_only }

end
```

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
lite-validators-1.8.0 docs/BOOLEAN.md
lite-validators-1.7.2 docs/BOOLEAN.md
lite-validators-1.7.1 docs/BOOLEAN.md
lite-validators-1.7.0 docs/BOOLEAN.md
lite-validators-1.6.0 docs/BOOLEAN.md
lite-validators-1.5.0 docs/BOOLEAN.md
lite-validators-1.4.0 docs/BOOLEAN.md
lite-validators-1.3.2 docs/BOOLEAN.md
lite-validators-1.3.1 docs/BOOLEAN.md
lite-validators-1.3.0 docs/BOOLEAN.md
lite-validators-1.2.0 docs/BOOLEAN.md
lite-validators-1.1.2 docs/BOOLEAN.md
lite-validators-1.1.1 docs/BOOLEAN.md