Class: Renalware::Patients::RespiratoryRateValidator
- Inherits:
-
ActiveModel::EachValidator
- Object
- ActiveModel::EachValidator
- Renalware::Patients::RespiratoryRateValidator
show all
- Includes:
- NumericRangeValidations
- Defined in:
- app/validators/renalware/patients/respiratory_rate_validator.rb
Constant Summary
collapse
- MIN_VALUE =
4
- MAX_VALUE =
40
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/respiratory_rate_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
|