Sha256: dfe19db3ca69a0d8c32a8fda44781c78496513e444fee7a746ad055ff89d41cb
Contents?: true
Size: 501 Bytes
Versions: 13
Compression:
Stored size: 501 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 :input0, alpha_numeric: true validates :input1, alpha_numeric: { case: :lower } validates :input2, alpha_numeric: { allow_space: true } end ```
Version data entries
13 entries across 13 versions & 1 rubygems