aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--app/models/referential_metadata.rb4
-rw-r--r--config/locales/referentials.en.yml2
-rw-r--r--config/locales/referentials.fr.yml2
3 files changed, 4 insertions, 4 deletions
diff --git a/app/models/referential_metadata.rb b/app/models/referential_metadata.rb
index 7a8a01774..a4e6333d7 100644
--- a/app/models/referential_metadata.rb
+++ b/app/models/referential_metadata.rb
@@ -44,8 +44,8 @@ class ReferentialMetadata < ApplicationModel
validate :check_end_greather_than_begin
def check_end_greather_than_begin
- if self.begin and self.end and self.begin >= self.end
- errors.add(:base, I18n.t('referentials.errors.short_period'))
+ if self.begin and self.end and self.begin > self.end
+ errors.add(:base, I18n.t('referentials.errors.invalid_period'))
end
end
diff --git a/config/locales/referentials.en.yml b/config/locales/referentials.en.yml
index 1381d5ddd..f52eaa1cb 100644
--- a/config/locales/referentials.en.yml
+++ b/config/locales/referentials.en.yml
@@ -47,7 +47,7 @@ en:
user_excluded: "%{user} is a reserved value"
overlapped_referential: "%{referential} cover the same perimeter"
overlapped_period: "Another period is on the same period"
- short_period: Min period length is two days
+ invalid_period: The begin date must be before end date
overview:
head:
dates: Dates
diff --git a/config/locales/referentials.fr.yml b/config/locales/referentials.fr.yml
index cf012ef8e..c4633014b 100644
--- a/config/locales/referentials.fr.yml
+++ b/config/locales/referentials.fr.yml
@@ -47,7 +47,7 @@ fr:
user_excluded: "%{user} est une valeur réservée"
overlapped_referential: "%{referential} couvre le même périmètre d'offre"
overlapped_period: "Une autre période chevauche cette période"
- short_period: "La durée minimum d'une période est de deux jours"
+ invalid_period: La date de début doit être antérieure à la date de fin
overview:
head:
dates: Dates