diff options
author | Douwe Maan <douwe@gitlab.com> | 2015-03-24 14:55:14 +0100 |
---|---|---|
committer | Douwe Maan <douwe@gitlab.com> | 2015-03-27 11:09:29 +0100 |
commit | dfe0f9eedf040c6c266161239b6e2ede77c2b7dc (patch) | |
tree | ff2c2ea02422b4d67ff98a6f256e1b68f52a3883 /app/models/snippet.rb | |
parent | 3f7531d6f2974ea75ab8e67bc93049f674ddb672 (diff) | |
download | gitlab-ce-dfe0f9eedf040c6c266161239b6e2ede77c2b7dc.tar.gz |
Use more specific regexes.
Diffstat (limited to 'app/models/snippet.rb')
-rw-r--r-- | app/models/snippet.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/app/models/snippet.rb b/app/models/snippet.rb index 3fb2ec1d66c..b35e72c4bdb 100644 --- a/app/models/snippet.rb +++ b/app/models/snippet.rb @@ -33,8 +33,8 @@ class Snippet < ActiveRecord::Base validates :file_name, presence: true, length: { within: 0..255 }, - format: { with: Gitlab::Regex.path_regex, - message: Gitlab::Regex.path_regex_message } + format: { with: Gitlab::Regex.file_name_regex, + message: Gitlab::Regex.file_name_regex_message } validates :content, presence: true validates :visibility_level, inclusion: { in: Gitlab::VisibilityLevel.values } |