Sha256: 5f5c6d2cd504d96b73f1abd195cfd1c725096ff8dae7743859d6e52a28c370cb
Contents?: true
Size: 722 Bytes
Versions: 3
Compression:
Stored size: 722 Bytes
Contents
module BootstrapValidatorRails module Validators class Length < Validator def generate_data data = {} return data if unsupported? options = validator_options data[:bv_stringlength] = 'true' if options[:minimum] data[:bv_stringlength_min] = options[:minimum] end if options[:maximum] data[:bv_stringlength_max] = options[:maximum] end if options[:is] data[:bv_stringlength_minimum] = options[:is] data[:bv_stringlength_maximum] = options[:is] data[:bv_stringlength_message] = @record.errors.generate_message(@method) end data end end end end
Version data entries
3 entries across 3 versions & 1 rubygems