Module: DataMapper::Validations::ValidatesPrimitiveType
- Extended by:
- Deprecate
- Included in:
- ClassMethods
- Defined in:
- lib/dm-validations/validators/primitive_validator.rb
Overview
class PrimitiveTypeValidator
Instance Method Summary collapse
-
#validates_primitive_type_of(*fields) ⇒ Object
Validates that the specified attribute is of the correct primitive type.
Instance Method Details
#validates_primitive_type_of(*fields) ⇒ Object
Validates that the specified attribute is of the correct primitive type.
50 51 52 53 |
# File 'lib/dm-validations/validators/primitive_validator.rb', line 50 def validates_primitive_type_of(*fields) opts = opts_from_validator_args(fields) add_validator_to_context(opts, fields, DataMapper::Validations::PrimitiveTypeValidator) end |