]> git.openstreetmap.org Git - rails.git/blobdiff - app/models/redaction.rb
Improve consistency of text validations
[rails.git] / app / models / redaction.rb
index b835864db074b40e7c27cfd8521e0689b96aa979..e99460c3b9860e6426ca2544adc2cd1889d011d2 100644 (file)
@@ -31,7 +31,8 @@ class Redaction < ActiveRecord::Base
   has_many :old_ways
   has_many :old_relations
 
-  validates :description, :presence => true
+  validates :title, :presence => true, :invalid_chars => true
+  validates :description, :presence => true, :invalid_chars => true
   validates :description_format, :inclusion => { :in => %w[text html markdown] }
 
   # this method overrides the AR default to provide the rich