We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 77f9e8d + 0a9b5b4 commit 4e368e6Copy full SHA for 4e368e6
lib/html5_validators/active_model/helper_methods.rb
@@ -9,7 +9,7 @@ def attribute_required?(attribute)
9
10
def attribute_maxlength(attribute)
11
self.validators.grep(LengthValidator).select {|v|
12
- v.attributes.include?(attribute.to_sym) && (v.options.keys & [:maximum, :is]).any? && (v.options.keys & [:if, :unless, :allow_nil, :allow_blank, :tokenizer]).empty?
+ v.attributes.include?(attribute.to_sym) && (v.options.keys & [:maximum, :is]).any? && (v.options.keys & [:if, :unless, :tokenizer]).empty?
13
}.map {|v| v.options.slice(:maximum, :is)}.map(&:values).flatten.max
14
end
15
0 commit comments