Sha256: f407fddc61da742e135dd6466351633c041e787f40a3f2fc9332c34872d6278f
Contents?: true
Size: 613 Bytes
Versions: 13
Compression:
Stored size: 613 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 :input0, uuid: true validates :input1, uuid: { version: 3 } end ```
Version data entries
13 entries across 13 versions & 1 rubygems