Sha256: 427f52e58d51b6b10b691f7d4cf523ac360381dbf7dcad08fe5c7eef94d8a96b

Contents?: true

Size: 511 Bytes

Versions: 9

Compression:

Stored size: 511 Bytes

Contents

# File content type

#### Rules

```ruby
# 1. Check
```

#### Options

Option | Type | Available | Default
--- | --- | --- | ---
include | array, regexp, string, symbol | |
exclude | array, regexp, string, symbol | |

#### Usage

```ruby
class User < ActiveRecord::Base

  validates :input_0, file_content_type: { include: 'text/csv' }
  validates :input_1, file_content_type: { exclude: %w[image/png text/plain] }
  validates :input_2, file_content_type: { include: /^text\/.*/, exclude: 'text/csv' }

end
```

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
lite-validators-1.1.0 docs/FILE_CONTENT_TYPE.md
lite-validators-1.0.7 docs/FILE_CONTENT_TYPE.md
lite-validators-1.0.6 docs/FILE_CONTENT_TYPE.md
lite-validators-1.0.5 docs/FILE_CONTENT_TYPE.md
lite-validators-1.0.4 docs/FILE_CONTENT_TYPE.md
lite-validators-1.0.3 docs/FILE_CONTENT_TYPE.md
lite-validators-1.0.2 docs/FILE_CONTENT_TYPE.md
lite-validators-1.0.1 docs/FILE_CONTENT_TYPE.md
lite-validators-1.0.0 docs/FILE_CONTENT_TYPE.md