diff options
Diffstat (limited to 'app/models/pdfresource.rb')
-rw-r--r-- | app/models/pdfresource.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/app/models/pdfresource.rb b/app/models/pdfresource.rb index a5ef56d..86e600c 100644 --- a/app/models/pdfresource.rb +++ b/app/models/pdfresource.rb @@ -6,7 +6,8 @@ class Pdfresource < ApplicationRecord numericality: { only_integer: true, greater_than_or_equal_to: 1, less_than_or_equal_to: 3, allow_nil: true }, allow_nil: true validate :validate_pdf_count - validates :name, :thumbnails, presence: true + validates :name, :thumbnails, :description, :card_description, :pdfs, :credits, presence: true + def validate_pdf_count if pdfs.size > 10 |