mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-01-01 05:02:50 +08:00
fixes project validation message [fixes SCI-2481]
This commit is contained in:
parent
1bc869d4ca
commit
11ebea573a
2 changed files with 8 additions and 3 deletions
|
@ -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
|
||||
|
||||
|
|
|
@ -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 <strong>%{name}</strong> successfully created."
|
||||
name_taken: "This project name has to be unique inside a team (this includes the archive)."
|
||||
update:
|
||||
success_flash: "Project <strong>%{name}</strong> successfully updated."
|
||||
error_flash: "Project <strong>%{name}</strong> not updated."
|
||||
|
|
Loading…
Reference in a new issue