Sha256: c514e7d699c3be409af16bdc164c42b866831823e0cf7ad5acb4866c1511d342
Contents?: true
Size: 318 Bytes
Versions: 13
Compression:
Stored size: 318 Bytes
Contents
# MAC address #### Rules ```ruby # 1. Pattern '2/5/2' => /^([\h]{2}[-|\.:|\s]){5}[\h]{2}?$/i '4/2/4' => /^([\h]{4}[-|\.:|\s]){2}[\h]{4}?$/i '6/6' => /^([\h]{6}[-|\.:|\s])[\h]{6}?$/i '12' => /^[\h]{12}?$/i ``` #### Usage ```ruby class User < ActiveRecord::Base validates :input0, mac_address: true end ```
Version data entries
13 entries across 13 versions & 1 rubygems