Sha256: 2db9921317ed240c6bc70157fddf9bec1d1f04bf8df209629408151293ed53d5

Contents?: true

Size: 318 Bytes

Versions: 6

Compression:

Stored size: 318 Bytes

Contents

require 'activemodel-validators/greater_than_validator'

module ActiveModel
  module Validations
    class AtLeastValidator < GreaterThanValidator
    protected
      def default_operator
        :>=
      end
      def operator_text
        options[:operator_text] || 'at least' || super
      end
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
activemodel-validators-3.0.1 lib/activemodel-validators/at_least_validator.rb
activemodel-validators-3.0.0 lib/activemodel-validators/at_least_validator.rb
activemodel-validators-2.0.0 lib/activemodel-validators/at_least_validator.rb
activemodel-validators-1.2.0 lib/activemodel-validators/at_least_validator.rb
activemodel-validators-1.1.0 lib/activemodel-validators/at_least_validator.rb
activemodel-validators-1.0.0 lib/activemodel-validators/at_least_validator.rb