Sha256: 01ee5b1440180505d328e3e8579bbf01e14394e55eb49c48a42d73068eacb41c
Contents?: true
Size: 376 Bytes
Versions: 1
Compression:
Stored size: 376 Bytes
Contents
module ActiveRecord 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
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
activerecord_strict_validations-0.3 | lib/active_record/strict_validations/validation/integer_validation.rb |