Class: Renalware::Patients::HDFPresenceValidator
- Inherits:
-
ActiveModel::EachValidator
- Object
- ActiveModel::EachValidator
- Renalware::Patients::HDFPresenceValidator
- Defined in:
- app/validators/renalware/patients/hdf_presence_validator.rb
Instance Method Summary collapse
Instance Method Details
#validate_each(_record, _attribute, value) ⇒ Object
11 12 13 14 15 16 17 |
# File 'app/validators/renalware/patients/hdf_presence_validator.rb', line 11 def validate_each(_record, _attribute, value) hdf = value attribute_names = [:subs_volume] attribute_names.each do |attribute_name| hdf.errors.add(attribute_name, :blank) if value[attribute_name].blank? end end |