Created
July 14, 2012 21:28
-
-
Save mattfordham/3113450 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
validates :my_csv_file, :csv => { | |
:columns => 3, # an exact number of columns | |
:max_columns => 10, # a maximum number of columns | |
:min_columns => 1, # a minimum number of columns | |
:rows => 20, # an exact number of rows | |
:max_rows => 30, # a maximum number of rows | |
:min_rows => 2, # a minimum number of rows | |
:email => 0, # will check to make sure all emails in specified column are valid email addresses | |
:numericality => 0, # will check to make sure all values in specified column are numerical | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment