Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Readme update
  • Loading branch information
mattfordham committed Jun 5, 2012
1 parent 40075f9 commit ef8f80e
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions README.md
Expand Up @@ -15,11 +15,15 @@ bundle install
Then add the following to your model:

```ruby
attr_accessor :my_csv_file

validates :my_csv_file, :csv => true
```

This will check to see if it is a properly formed CSV file.

In this case, csv_validator expects :my_csv_file to be an instance of ActionDispatch::Http::UploadedFile, which is created by default for Rails uploads.

## Other validation options

There are a handful of other options for more specific validation too. A complete list is below... note that you wouldn't use all simultaneously.
Expand Down

0 comments on commit ef8f80e

Please sign in to comment.