X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/38640e0253e8984974d275f2c232eb057ba86c84..c2f23fea6a7821a4ad4c97fd65744b138ec86267:/app/models/note_comment.rb diff --git a/app/models/note_comment.rb b/app/models/note_comment.rb index f8450d0a3..69a93c532 100644 --- a/app/models/note_comment.rb +++ b/app/models/note_comment.rb @@ -33,7 +33,8 @@ class NoteComment < ActiveRecord::Base validates :visible, :inclusion => [true, false] validates :author, :associated => true validates :event, :inclusion => %w[opened closed reopened commented hidden] - validates :body, :format => /\A[^\x00-\x08\x0b-\x0c\x0e-\x1f\x7f\ufffe\uffff]*\z/ + validates :body, :length => { :maximum => 2000 }, + :invalid_chars => true # Return the comment text def body