Sha256: 4c2a0454e81715001face6f1c6922baf8db1e03de083c34d4972b17d0282d0ca
Contents?: true
Size: 869 Bytes
Versions: 9
Compression:
Stored size: 869 Bytes
Contents
# CSV #### Rules ```ruby # 1. Dimension :columns :rows # 2. Check :in => '===' :less_than => '<' :less_than_or_equal_to => '<=' :greater_than => '>' :greater_than_or_equal_to => '>=' :equal_to => '==' :not_equal_to => '!=' ``` #### Options Option | Type | Available | Default --- | --- | --- | --- columns | hash | | rows | hash | | in | range | | less_than | numeric | | less_than_or_equal_to | numeric | | greater_than | numeric | | greater_than_or_equal_to | numeric | | equal_to | numeric | | not_equal_to | numeric | | #### Usage ```ruby class User < ActiveRecord::Base validates :input_0, csv: { columns: { less_than: 100 } } validates :input_1, csv: { rows: { in: (50..100) } } validates :input_2, csv: { columns: { equal_to: 5 }, rows: { greater_than: 5 } } end ```
Version data entries
9 entries across 9 versions & 1 rubygems