Class: Valigator::CSV::FieldValidators::Mandatory
- Inherits:
-
Base
- Object
- Base
- Valigator::CSV::FieldValidators::Mandatory
show all
- Defined in:
- lib/valigator/csv/field_validators/mandatory.rb
Instance Attribute Summary
Attributes inherited from Base
#options
Instance Method Summary
collapse
Methods inherited from Base
#==, #initialize
Instance Method Details
#error_message ⇒ Object
18
19
20
|
# File 'lib/valigator/csv/field_validators/mandatory.rb', line 18
def error_message
'Missing mandatory field'
end
|
#error_type ⇒ Object
12
13
14
|
# File 'lib/valigator/csv/field_validators/mandatory.rb', line 12
def error_type
'missing_field'
end
|
#valid?(value) ⇒ Boolean
6
7
8
|
# File 'lib/valigator/csv/field_validators/mandatory.rb', line 6
def valid?(value)
not blank? value
end
|