diff options
author | Douwe Maan <douwe@gitlab.com> | 2015-12-08 12:50:25 +0100 |
---|---|---|
committer | Douwe Maan <douwe@gitlab.com> | 2015-12-08 12:50:25 +0100 |
commit | 3c80a543153f8f686ec99d2d04b181b2d2c8a665 (patch) | |
tree | 679ca3921b00bd9e0904b4ad1be4e01d0a753ee9 /app/models/note.rb | |
parent | 1a942111653e9376d6275c5bd31f23cb27f58ab5 (diff) | |
parent | f5430e48b42227f1c1874ca27c6907f0f704be28 (diff) | |
download | gitlab-ce-ui/misc.tar.gz |
Merge branch 'master' into ui/miscui/misc
Diffstat (limited to 'app/models/note.rb')
-rw-r--r-- | app/models/note.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/models/note.rb b/app/models/note.rb index 239a0f77f8e..8d433c57ceb 100644 --- a/app/models/note.rb +++ b/app/models/note.rb @@ -44,7 +44,7 @@ class Note < ActiveRecord::Base validates :note, :project, presence: true validates :note, uniqueness: { scope: [:author, :noteable_type, :noteable_id] }, if: ->(n) { n.is_award } validates :note, inclusion: { in: Emoji.emojis_names }, if: ->(n) { n.is_award } - validates :line_code, format: { with: /\A[a-z0-9]+_\d+_\d+\Z/ }, allow_blank: true + validates :line_code, line_code: true, allow_blank: true # Attachments are deprecated and are handled by Markdown uploader validates :attachment, file_size: { maximum: :max_attachment_size } |