diff options
Diffstat (limited to 'activemodel/lib/active_model/validations/format.rb')
-rw-r--r-- | activemodel/lib/active_model/validations/format.rb | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/activemodel/lib/active_model/validations/format.rb b/activemodel/lib/active_model/validations/format.rb index 80150229a0..be7cae588f 100644 --- a/activemodel/lib/active_model/validations/format.rb +++ b/activemodel/lib/active_model/validations/format.rb @@ -1,8 +1,7 @@ module ActiveModel - # == Active Model Format Validator module Validations - class FormatValidator < EachValidator #:nodoc: + class FormatValidator < EachValidator # :nodoc: def validate_each(record, attribute, value) if options[:with] regexp = option_call(record, :with) @@ -30,7 +29,7 @@ module ActiveModel end def record_error(record, attribute, name, value) - record.errors.add(attribute, :invalid, options.except(name).merge!(:value => value)) + record.errors.add(attribute, :invalid, options.except(name).merge!(value: value)) end def regexp_using_multiline_anchors?(regexp) |