Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2023-02-09 15:11:06 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2023-02-09 15:11:06 +0300
commit6180f62ab34662c64103872b8352b25817b73a8d (patch)
tree2d7f30b845726fb0bff9ee191c11996c04c22c2c /app/models
parent2e2db606cc7547b445a11c367d8db6f5feb42443 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/models')
-rw-r--r--app/models/appearance.rb12
1 files changed, 9 insertions, 3 deletions
diff --git a/app/models/appearance.rb b/app/models/appearance.rb
index 833f2335774..b926c6abedc 100644
--- a/app/models/appearance.rb
+++ b/app/models/appearance.rb
@@ -27,15 +27,21 @@ class Appearance < ApplicationRecord
cache_markdown_field :footer_message, pipeline: :broadcast_message
validates :pwa_name,
- length: { maximum: 255, message: N_("is too long (maximum is %{count} characters)") },
+ length: { maximum: 255, too_long: ->(object, data) {
+ N_("is too long (maximum is %{count} characters)")
+ } },
allow_blank: true
validates :pwa_short_name,
- length: { maximum: 255, message: N_("is too long (maximum is %{count} characters)") },
+ length: { maximum: 255, too_long: ->(object, data) {
+ N_("is too long (maximum is %{count} characters)")
+ } },
allow_blank: true
validates :pwa_description,
- length: { maximum: 2048, message: N_("is too long (maximum is %{count} characters)") },
+ length: { maximum: 2048, too_long: ->(object, data) {
+ N_("is too long (maximum is %{count} characters)")
+ } },
allow_blank: true
validates :logo, file_size: { maximum: 1.megabyte }