Class: Dragnet::Validators::Fields::DescriptionValidator
- Inherits:
-
FieldValidator
- Object
- FieldValidator
- Dragnet::Validators::Fields::DescriptionValidator
- Defined in:
- lib/dragnet/validators/fields/description_validator.rb
Overview
Validates the description
field for a MTR.
Instance Method Summary collapse
-
#validate(key, value) ⇒ Object
Validates a MTR's description :reek:NilCheck (Only
nil
is allowed,false
should be considered invalid).
Instance Method Details
#validate(key, value) ⇒ Object
Validates a MTR's description :reek:NilCheck (Only nil
is allowed, false
should be considered invalid).
16 17 18 19 20 |
# File 'lib/dragnet/validators/fields/description_validator.rb', line 16 def validate(key, value) return if value.nil? validate_type(key, value, String) end |