|
|
@ -3,7 +3,7 @@ module Validations::SetupValidations |
|
|
|
include CollectionTimeHelper |
|
|
|
include CollectionTimeHelper |
|
|
|
|
|
|
|
|
|
|
|
def validate_startdate_setup(record) |
|
|
|
def validate_startdate_setup(record) |
|
|
|
return unless record.startdate && date_valid?("startdate", record) && FeatureToggle.startdate_collection_window_validation_enabled? |
|
|
|
return unless record.startdate && date_valid?("startdate", record) |
|
|
|
|
|
|
|
|
|
|
|
unless record.startdate.between?(active_collection_start_date, current_collection_end_date) |
|
|
|
unless record.startdate.between?(active_collection_start_date, current_collection_end_date) |
|
|
|
record.errors.add :startdate, startdate_validation_error_message |
|
|
|
record.errors.add :startdate, startdate_validation_error_message |
|
|
|