Sha256: 79e6c9ce90d9d208caed7b51c3c2b801c6664324856a2cc387b1f9d003eb8dad

Contents?: true

Size: 615 Bytes

Versions: 9

Compression:

Stored size: 615 Bytes

Contents

# UUID

#### Rules

```ruby
# 1. Pattern
:any => /^[0-9A-F]{8}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{12}$/i
3    => /^[0-9A-F]{8}-[0-9A-F]{4}-3[0-9A-F]{3}-[0-9A-F]{4}-[0-9A-F]{12}$/i
4    => /^[0-9A-F]{8}-[0-9A-F]{4}-4[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$/i
5    => /^[0-9A-F]{8}-[0-9A-F]{4}-5[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$/i
```

#### Options

Option | Type | Available | Default
--- | --- | --- | ---
version | symbol, integer | any, 3, 4, 5 | any

#### Usage

```ruby
class User < ActiveRecord::Base

  validates :input_0, uuid: true
  validates :input_1, uuid: { version: 3 }

end
```

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
lite-validators-1.1.0 docs/UUID.md
lite-validators-1.0.7 docs/UUID.md
lite-validators-1.0.6 docs/UUID.md
lite-validators-1.0.5 docs/UUID.md
lite-validators-1.0.4 docs/UUID.md
lite-validators-1.0.3 docs/UUID.md
lite-validators-1.0.2 docs/UUID.md
lite-validators-1.0.1 docs/UUID.md
lite-validators-1.0.0 docs/UUID.md