Sha256: 9486c735cb04fd2794f9558d9c5dabf9c33e7d86881d245b7acf59f1ab0742a7

Contents?: true

Size: 333 Bytes

Versions: 11

Compression:

Stored size: 333 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

11 entries across 11 versions & 1 rubygems

Version Path
ohm-contrib-0.0.27 lib/ohm/contrib/number_validations.rb
ohm-contrib-0.0.26 lib/ohm/contrib/number_validations.rb
ohm-contrib-0.0.25 lib/ohm/contrib/number_validations.rb
ohm-contrib-0.0.24 lib/ohm/contrib/number_validations.rb
ohm-contrib-0.0.23 lib/ohm/contrib/number_validations.rb
ohm-contrib-0.0.22 lib/ohm/contrib/number_validations.rb
ohm-contrib-0.0.21 lib/ohm/contrib/number_validations.rb
ohm-contrib-0.0.20 lib/ohm/contrib/number_validations.rb
ohm-contrib-0.0.19 lib/ohm/contrib/number_validations.rb
ohm-contrib-0.0.18 lib/ohm/contrib/number_validations.rb
ohm-contrib-0.0.17 lib/ohm/contrib/number_validations.rb