Sha256: be720c0581af274011d7337a68d24d2bae9c8b759f71f8d757d78e4751c1f2fa

Contents?: true

Size: 419 Bytes

Versions: 1

Compression:

Stored size: 419 Bytes

Contents

module ActiveRecord
  module MySQL
    module Strict
      class Validation
        class IntegerValidation < Validation
          UPPER_LIMIT = 2147483647
          LOWER_LIMIT = -2147483647

          def apply
            model.validates field.name, numericality: { greather_than_or_equal_to: LOWER_LIMIT, less_than_or_equal_to: UPPER_LIMIT }, allow_blank: true
          end
        end
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
activerecord_mysql_strict-0.2.1 lib/active_record/mysql/strict/validation/integer_validation.rb