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:
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,