Sha256: 23654be6e91561a673f9616f8021f9c937f42be245258229e7fa4b2e6b3b8cef
Contents?: true
Size: 504 Bytes
Versions: 9
Compression:
Stored size: 504 Bytes
Contents
# Alpha numeric #### Rules ```ruby # 1. Pattern :any => /^[A-Za-z0-9]+$/ :lower => /^[a-z0-9]+$/ :upper => /^[A-Z0-9]+$/ ``` #### Options Option | Type | Available | Default --- | --- | --- | --- case | symbol | any, lower, upper | any allow_space | boolean | true, false | false #### Usage ```ruby class User < ActiveRecord::Base validates :input_0, alpha_numeric: true validates :input_1, alpha_numeric: { case: :lower } validates :input_2, alpha_numeric: { allow_space: true } end ```
Version data entries
9 entries across 9 versions & 1 rubygems