]> git.openstreetmap.org Git - rails.git/blobdiff - app/validators/trailing_whitespace_validator.rb
Merge leading and trailing whitespace validators
[rails.git] / app / validators / trailing_whitespace_validator.rb
diff --git a/app/validators/trailing_whitespace_validator.rb b/app/validators/trailing_whitespace_validator.rb
deleted file mode 100644 (file)
index 03d6ef4..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-class TrailingWhitespaceValidator < ActiveModel::EachValidator
-  def validate_each(record, attribute, value)
-    record.errors[attribute] << (options[:message] || I18n.t("validations.trailing whitespace")) if value =~ /\s\z/
-  end
-end