Skip to content
Snippets Groups Projects
Commit e8f10f31 authored by Riyad Preukschas's avatar Riyad Preukschas
Browse files

Fix Note validation

* remove length restriction on note
* add format validation for line_code
parent 654f1010
No related branches found
No related tags found
1 merge request!1878Discussions (a.k.a. Grouped Comments)
Loading
Loading
@@ -32,6 +32,7 @@ class Note < ActiveRecord::Base
delegate :name, :email, to: :author, prefix: true
 
validates :note, :project, presence: true
validates :line_code, format: { with: /\A\d+_\d+_\d+\Z/ }, allow_blank: true
validates :attachment, file_size: { maximum: 10.megabytes.to_i }
 
mount_uploader :attachment, AttachmentUploader
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment