diff options
Diffstat (limited to '')
-rw-r--r-- | app/models/pdfresource.rb | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/app/models/pdfresource.rb b/app/models/pdfresource.rb index 6131034..6614f66 100644 --- a/app/models/pdfresource.rb +++ b/app/models/pdfresource.rb @@ -1,4 +1,7 @@ class Pdfresource < ApplicationRecord has_many_attached :pdfs has_many_attached :thumbnails + validates :feature_slot, + numericality: { only_integer: true, greater_than_or_equal_to: 1, less_than_or_equal_to: 3, allow_nil: true }, + allow_nil: true end |