Allow note comments with no body

This commit is contained in:
Tom Hughes 2018-11-05 09:24:51 +00:00
parent c42900f538
commit e93e5fbe63

View file

@ -33,7 +33,7 @@ class NoteComment < ActiveRecord::Base
validates :visible, :inclusion => [true, false]
validates :author, :associated => true
validates :event, :inclusion => %w[opened closed reopened commented hidden]
validates :body, :allow_blank => false, :length => { :maximum => 2000 },
validates :body, :length => { :maximum => 2000 },
:format => /\A[^\x00-\x08\x0b-\x0c\x0e-\x1f\x7f\ufffe\uffff]*\z/
# Return the comment text