Class: Renalware::Patients::PulseValidator
- Inherits:
-
ActiveModel::EachValidator
- Object
- ActiveModel::EachValidator
- Renalware::Patients::PulseValidator
show all
- Includes:
- NumericRangeValidations
- Defined in:
- app/validators/renalware/patients/pulse_validator.rb
Constant Summary
collapse
- MIN_VALUE =
20
- MAX_VALUE =
200
Instance Method Summary
collapse
#validate_number_is_in_range
Instance Method Details
#validate_each(record, attribute, value) ⇒ Object
10
11
12
13
14
|
# File 'app/validators/renalware/patients/pulse_validator.rb', line 10
def validate_each(record, attribute, value)
return if value.blank?
validate_number_is_in_range(record, attribute, value, MIN_VALUE, MAX_VALUE)
end
|