X-Git-Url: https://git.openstreetmap.org/rails.git/blobdiff_plain/3b68061e8760448a80cd501e429b9901944fdf1d..e091246ffc2d640f0a7f2324998315b33b891847:/app/validators/trailing_whitespace_validator.rb diff --git a/app/validators/trailing_whitespace_validator.rb b/app/validators/trailing_whitespace_validator.rb index 03d6ef4db..aacc6dd04 100644 --- a/app/validators/trailing_whitespace_validator.rb +++ b/app/validators/trailing_whitespace_validator.rb @@ -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