]> git.openstreetmap.org Git - rails.git/blobdiff - app/validators/trailing_whitespace_validator.rb
Changed User model to not allow nil display_name (w/ tests)
[rails.git] / app / validators / trailing_whitespace_validator.rb
index 03d6ef4db3bc88924ab370548d30faab2d97e650..aacc6dd043f2c503dfc32200ad4072fdb9fb4dd9 100644 (file)
@@ -1,5 +1,5 @@
 class TrailingWhitespaceValidator < ActiveModel::EachValidator
   def validate_each(record, attribute, value)
-    record.errors[attribute] << (options[:message] || I18n.t("validations.trailing whitespace")) if value =~ /\s\z/
+    record.errors[attribute] << (options[:message] || I18n.t("validations.trailing_whitespace")) if value =~ /\s\z/
   end
 end