README.md in file_validators-2.0.0 vs README.md in file_validators-2.0.1
- old
+ new
@@ -140,10 +140,9 @@
* `mode`: `:strict` or `:relaxed`. `:strict` mode can detect content type based on the contents
of the files. It also detects media type spoofing (see more in [security](#security)).
`:relaxed` mode uses file name to detect the content type using `mime-types` gem.
If mode option is not set then the validator uses form supplied content type.
```ruby
-# string
validates :avatar, file_content_type: { allow: 'image/jpeg', mode: :strict }
validates :avatar, file_content_type: { allow: 'image/jpeg', mode: :relaxed }
```
* `message`: The message to display when the uploaded file has an invalid content type.
You will get `types` as a replacement. You can write error messages without using any replacement.