Sha256: ca8f8b35db846d5ad8d346abdd9c19567a9d5eb818962fcec16e94f1ed93af66
Contents?: true
Size: 368 Bytes
Versions: 13
Compression:
Stored size: 368 Bytes
Contents
module Ohm # This module will include all numeric validation needs. # As of VERSION 0.0.27, Ohm::NumberValidations#assert_decimal # is the only method provided. module NumberValidations DECIMAL_REGEX = /^(\d+)?(\.\d+)?$/ protected def assert_decimal(att, error = [att, :not_decimal]) assert_format att, DECIMAL_REGEX, error end end end
Version data entries
13 entries across 13 versions & 1 rubygems