diff options
Diffstat (limited to 'app/validators/html_validator.rb')
-rw-r--r-- | app/validators/html_validator.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/validators/html_validator.rb b/app/validators/html_validator.rb index 1c9cd303c..b85b9769f 100644 --- a/app/validators/html_validator.rb +++ b/app/validators/html_validator.rb @@ -15,6 +15,6 @@ class HtmlValidator < ActiveModel::EachValidator def html_errors(str) fragment = Nokogiri::HTML.fragment(options[:wrap_with] ? "<#{options[:wrap_with]}>#{str}</#{options[:wrap_with]}>" : str) - fragment.errors.select { |error| ERROR_RE =~ error.message } + fragment.errors.select { |error| ERROR_RE.match?(error.message) } end end |