Module: DataMapper::Validations::ValidatesNumericality

Extended by:
Deprecate
Included in:
ClassMethods
Defined in:
lib/dm-validations/validators/numeric_validator.rb

Overview

class NumericalityValidator

Instance Method Summary collapse

Instance Method Details

#validates_numericality_of(*fields) ⇒ Object

Validate whether a field is numeric.



175
176
177
# File 'lib/dm-validations/validators/numeric_validator.rb', line 175

def validates_numericality_of(*fields)
  validators.add(NumericalityValidator, *fields)
end