diff --git a/app/models/project.rb b/app/models/project.rb
index f3f938301..2d5c9aafa 100644
--- a/app/models/project.rb
+++ b/app/models/project.rb
@@ -7,8 +7,7 @@ class Project < ApplicationRecord
validates :name,
length: { minimum: Constants::NAME_MIN_LENGTH,
maximum: Constants::NAME_MAX_LENGTH },
- uniqueness: { scope: :team, case_sensitive: false,
- message: I18n.t('projects.create.name_taken') }
+ uniqueness: { scope: :team, case_sensitive: false }
validates :visibility, presence: true
validates :team, presence: true
diff --git a/config/locales/en.yml b/config/locales/en.yml
index 8d579a80c..44c1b26dd 100644
--- a/config/locales/en.yml
+++ b/config/locales/en.yml
@@ -52,6 +52,13 @@ en:
email_already_taken: "SciNote account with email %{email} alreday exists"
failed_to_save: "Failed to create new user"
+ activerecord:
+ errors:
+ models:
+ project:
+ attributes:
+ name:
+ taken: "This project name has to be unique inside a team (this includes the archive)."
helpers:
label:
team:
@@ -268,7 +275,6 @@ en:
contact_admins: "To invite additional users to team %{team}, contact its administrator/s."
create:
success_flash: "Project %{name} successfully created."
- name_taken: "This project name has to be unique inside a team (this includes the archive)."
update:
success_flash: "Project %{name} successfully updated."
error_flash: "Project %{name} not updated."