mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-10-08 21:06:24 +08:00
Merge pull request #1193 from ZmagoD/zd_SCI_2481_
fixes project validation message [fixes SCI-2481]
This commit is contained in:
commit
eff68aead8
2 changed files with 8 additions and 3 deletions
|
@ -7,8 +7,7 @@ class Project < ApplicationRecord
|
||||||
validates :name,
|
validates :name,
|
||||||
length: { minimum: Constants::NAME_MIN_LENGTH,
|
length: { minimum: Constants::NAME_MIN_LENGTH,
|
||||||
maximum: Constants::NAME_MAX_LENGTH },
|
maximum: Constants::NAME_MAX_LENGTH },
|
||||||
uniqueness: { scope: :team, case_sensitive: false,
|
uniqueness: { scope: :team, case_sensitive: false }
|
||||||
message: I18n.t('projects.create.name_taken') }
|
|
||||||
validates :visibility, presence: true
|
validates :visibility, presence: true
|
||||||
validates :team, presence: true
|
validates :team, presence: true
|
||||||
|
|
||||||
|
|
|
@ -52,6 +52,13 @@ en:
|
||||||
email_already_taken: "SciNote account with email %{email} alreday exists"
|
email_already_taken: "SciNote account with email %{email} alreday exists"
|
||||||
failed_to_save: "Failed to create new user"
|
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:
|
helpers:
|
||||||
label:
|
label:
|
||||||
team:
|
team:
|
||||||
|
@ -268,7 +275,6 @@ en:
|
||||||
contact_admins: "To invite additional users to team %{team}, contact its administrator/s."
|
contact_admins: "To invite additional users to team %{team}, contact its administrator/s."
|
||||||
create:
|
create:
|
||||||
success_flash: "Project <strong>%{name}</strong> successfully created."
|
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:
|
update:
|
||||||
success_flash: "Project <strong>%{name}</strong> successfully updated."
|
success_flash: "Project <strong>%{name}</strong> successfully updated."
|
||||||
error_flash: "Project <strong>%{name}</strong> not updated."
|
error_flash: "Project <strong>%{name}</strong> not updated."
|
||||||
|
|
Loading…
Add table
Reference in a new issue