Commit e8f10f317faca1c87ad6529e3661afa788cb7896
1 parent
654f1010
Exists in
master
and in
4 other branches
Fix Note validation
* remove length restriction on note * add format validation for line_code
Showing
1 changed file
with
1 additions
and
0 deletions
Show diff stats
app/models/note.rb
... | ... | @@ -32,6 +32,7 @@ class Note < ActiveRecord::Base |
32 | 32 | delegate :name, :email, to: :author, prefix: true |
33 | 33 | |
34 | 34 | validates :note, :project, presence: true |
35 | + validates :line_code, format: { with: /\A\d+_\d+_\d+\Z/ }, allow_blank: true | |
35 | 36 | validates :attachment, file_size: { maximum: 10.megabytes.to_i } |
36 | 37 | |
37 | 38 | mount_uploader :attachment, AttachmentUploader | ... | ... |