|
|
|
@ -74,7 +74,8 @@ private
|
|
|
|
|
return if change_date.blank? |
|
|
|
|
|
|
|
|
|
if organisation.organisation_name_changes.visible.select(&:persisted?).any? { |record| record.change_date == change_date } |
|
|
|
|
errors.add(:change_date, "Start date cannot be the same as another name change.") |
|
|
|
|
errors.add(:change_date, "Start date cannot be the same as another name change.") unless immediate_change |
|
|
|
|
errors.add(:immediate_change, "Start date cannot be the same as another name change.") if immediate_change |
|
|
|
|
end |
|
|
|
|
end |
|
|
|
|
|
|
|
|
|