diff options
| author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2015-02-02 21:15:44 -0800 |
|---|---|---|
| committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2015-02-02 21:15:44 -0800 |
| commit | cc39bca3fa71930421f1c46844b4d02d5ff93e8b (patch) | |
| tree | f9a600dee04bca35f0319a64ce23bdff7ea724d9 /app/models/project.rb | |
| parent | c427bf08e41342957632289e084604f53e65e353 (diff) | |
| download | gitlab-ce-cc39bca3fa71930421f1c46844b4d02d5ff93e8b.tar.gz | |
Rubocop: Style/AlignHash enabled
Diffstat (limited to 'app/models/project.rb')
| -rw-r--r-- | app/models/project.rb | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/app/models/project.rb b/app/models/project.rb index f314ed9bd25..cfe40553ab5 100644 --- a/app/models/project.rb +++ b/app/models/project.rb @@ -108,13 +108,17 @@ class Project < ActiveRecord::Base # Validations validates :creator, presence: true, on: :create validates :description, length: { maximum: 2000 }, allow_blank: true - validates :name, presence: true, length: { within: 0..255 }, - format: { with: Gitlab::Regex.project_name_regex, - message: Gitlab::Regex.project_regex_message } - validates :path, presence: true, length: { within: 0..255 }, - exclusion: { in: Gitlab::Blacklist.path }, - format: { with: Gitlab::Regex.path_regex, - message: Gitlab::Regex.path_regex_message } + validates :name, + presence: true, + length: { within: 0..255 }, + format: { with: Gitlab::Regex.project_name_regex, + message: Gitlab::Regex.project_regex_message } + validates :path, + presence: true, + length: { within: 0..255 }, + exclusion: { in: Gitlab::Blacklist.path }, + format: { with: Gitlab::Regex.path_regex, + message: Gitlab::Regex.path_regex_message } validates :issues_enabled, :merge_requests_enabled, :wiki_enabled, inclusion: { in: [true, false] } validates :visibility_level, |
