Sha256: b4213d92c7513238c1445b37b0257e839748605371c8da5131369e4b973df5e7
Contents?: true
Size: 334 Bytes
Versions: 2
Compression:
Stored size: 334 Bytes
Contents
module Ohm # This module will include all numeric validation needs. # As of VERSION 0.0.15, Ohm::NumberValidations#assert_decimal # is the only method provided. module NumberValidations protected def assert_decimal(att, error = [att, :not_decimal]) assert_format(att, /^(\d+)?(\.\d+)?$/, error) end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
ohm-contrib-0.0.16 | lib/ohm/contrib/number_validations.rb |
ohm-contrib-0.0.15 | lib/ohm/contrib/number_validations.rb |