class ParsleySimpleForm::Constraints::Basics::MaxLengthConstraint

Public Instance Methods

html_attributes() click to toggle source
# File lib/parsley_simple_form/constraints/basics/maxlength_constraint.rb, line 10
def html_attributes
  {
    :'data-parsley-maxlength' => @options[:maxlength],
    :'data-parsley-maxlength-message' => I18n::translate('form_validation.message.maxlength', maxlength: @options[:maxlength])
  }
end
match?() click to toggle source
# File lib/parsley_simple_form/constraints/basics/maxlength_constraint.rb, line 6
def match?
  !@options[:maxlength].nil?
end