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>2019-12-16 15:07:43 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2019-12-16 15:07:43 +0300
commitd10a462fedbd7794a83abdba9b4526600f71de5b (patch)
tree4dbd21cb89013d9e07b05bac5101cd13585a8be5 /app/models/application_setting.rb
parent13867d66e92c2fd8962a126db4fbdc32891343c9 (diff)
Add latest changes from gitlab-org/gitlab@masterogolowinski-master-patch-80898
Diffstat (limited to 'app/models/application_setting.rb')
-rw-r--r--app/models/application_setting.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/app/models/application_setting.rb b/app/models/application_setting.rb
index e764b6c56b0..456b6430088 100644
--- a/app/models/application_setting.rb
+++ b/app/models/application_setting.rb
@@ -46,6 +46,12 @@ class ApplicationSetting < ApplicationRecord
presence: true,
numericality: { only_integer: true, greater_than_or_equal_to: 0 }
+ validates :minimum_password_length,
+ presence: true,
+ numericality: { only_integer: true,
+ greater_than_or_equal_to: DEFAULT_MINIMUM_PASSWORD_LENGTH,
+ less_than_or_equal_to: Devise.password_length.max }
+
validates :home_page_url,
allow_blank: true,
addressable_url: true,