Sha256: c123f478a7ee7ded9117478f969b05b8d793f406a6de201d2a6e9ad6150af3d8
Contents?: true
Size: 463 Bytes
Versions: 35
Compression:
Stored size: 463 Bytes
Contents
module Schematic module Generator module Restrictions class Length < Base def generate(builder) for_validator ActiveModel::Validations::LengthValidator do |validator| builder.xs(:maxLength, "value" => validator.options[:maximum]) if validator.options[:maximum] builder.xs(:minLength, "value" => validator.options[:minimum]) if validator.options[:minimum] end end end end end end
Version data entries
35 entries across 35 versions & 1 rubygems