diff --git a/app/forms/curation_concerns/generic_work_form.rb b/app/forms/curation_concerns/generic_work_form.rb index 43f1d7c6..4195f125 100644 --- a/app/forms/curation_concerns/generic_work_form.rb +++ b/app/forms/curation_concerns/generic_work_form.rb @@ -5,7 +5,7 @@ class GenericWorkForm < Umrdr::Forms::WorkForm self.model_class = ::GenericWork include HydraEditor::Form::Permissions self.terms += [:resource_type, :date_coverage] - self.required_fields = [ :title, :creator, :methodology, :description, :rights, :subject ] + self.required_fields = [ :title, :creator, :methodology, :description, :rights, :subject, :authoremail ] def rendered_terms [ :title, :creator, :authoremail, :methodology, :description, :date_coverage, :rights, :subject, :fundedby, :grantnumber, :keyword, :language, :resource_type, :isReferencedBy, :on_behalf_of, :visibility ] diff --git a/app/models/generic_work.rb b/app/models/generic_work.rb index 7c7d57ca..c7c6936e 100644 --- a/app/models/generic_work.rb +++ b/app/models/generic_work.rb @@ -9,6 +9,7 @@ class GenericWork < ActiveFedora::Base validates :description, presence: { message: 'Your work must have a description.' } validates :methodology, presence: { message: 'Your work must have a description of the method for collecting the dataset.' } validates :rights, presence: { message: 'You must select a license for your work.' } + validates :authoremail, presence: { message: 'You must have author contact information.' } after_initialize :set_defaults