]> git.openstreetmap.org Git - rails.git/blobdiff - app/models/note_comment.rb
Create invalid_char validators and apply to models
[rails.git] / app / models / note_comment.rb
index 1772b3f9728aaab6502dec45b0a0f15977c678d2..69a93c532a53354f725a0490d5d01461ac6a8b66 100644 (file)
@@ -34,7 +34,7 @@ class NoteComment < ActiveRecord::Base
   validates :author, :associated => true
   validates :event, :inclusion => %w[opened closed reopened commented hidden]
   validates :body, :length => { :maximum => 2000 },
-                   :format => /\A[^\x00-\x08\x0b-\x0c\x0e-\x1f\x7f\ufffe\uffff]*\z/
+                   :invalid_chars => true
 
   # Return the comment text
   def body