Sha256: 681854bc025c727ad7b52f4a6a9ce26abd1be2ea54950eaf5f081030b28f78d1

Contents?: true

Size: 477 Bytes

Versions: 24

Compression:

Stored size: 477 Bytes

Contents

# frozen_string_literal: true

module Mongoid
  module Validatable

    # Validates that the specified attributes do or do not match a certain
    # length.
    #
    # @example Set up the length validator.
    #
    #   class Person
    #     include Mongoid::Document
    #     field :website
    #
    #     validates_length_of :website, in: 1..10
    #   end
    class LengthValidator < ActiveModel::Validations::LengthValidator
      include Localizable
    end
  end
end

Version data entries

24 entries across 24 versions & 1 rubygems

Version Path
mongoid-8.1.7 lib/mongoid/validatable/length.rb
mongoid-8.1.6 lib/mongoid/validatable/length.rb
mongoid-8.0.8 lib/mongoid/validatable/length.rb
mongoid-8.1.5 lib/mongoid/validatable/length.rb
mongoid-8.1.4 lib/mongoid/validatable/length.rb
mongoid-8.0.7 lib/mongoid/validatable/length.rb
mongoid-8.1.3 lib/mongoid/validatable/length.rb
mongoid-8.1.2 lib/mongoid/validatable/length.rb
mongoid-8.0.6 lib/mongoid/validatable/length.rb
mongoid-7.5.4 lib/mongoid/validatable/length.rb
mongoid-8.1.1 lib/mongoid/validatable/length.rb
mongoid-8.0.5 lib/mongoid/validatable/length.rb
mongoid-8.1.0 lib/mongoid/validatable/length.rb
mongoid-7.5.3 lib/mongoid/validatable/length.rb
mongoid-8.0.4 lib/mongoid/validatable/length.rb
mongoid-8.0.3 lib/mongoid/validatable/length.rb
mongoid-7.5.2 lib/mongoid/validatable/length.rb
mongoid-8.0.2 lib/mongoid/validatable/length.rb
mongoid-7.5.1 lib/mongoid/validatable/length.rb
mongoid-7.4.3 lib/mongoid/validatable/length.rb