Sha256: 0e97f4ffd8acc162f3dc45e963e2811cbdcb67b806959ffad3e8fb172df0e2f9

Contents?: true

Size: 396 Bytes

Versions: 114

Compression:

Stored size: 396 Bytes

Contents

# frozen_string_literal: true

module Renalware
  module Patients
    class PulseValidator < ActiveModel::EachValidator
      include NumericRangeValidations
      MIN_VALUE = 20
      MAX_VALUE = 200

      def validate_each(record, attribute, value)
        return if value.blank?

        validate_number_is_in_range(record, attribute, value, MIN_VALUE, MAX_VALUE)
      end
    end
  end
end

Version data entries

114 entries across 114 versions & 1 rubygems

Version Path
renalware-core-2.1.1 app/validators/renalware/patients/pulse_validator.rb
renalware-core-2.1.0 app/validators/renalware/patients/pulse_validator.rb
renalware-core-2.0.167 app/validators/renalware/patients/pulse_validator.rb
renalware-core-2.0.166 app/validators/renalware/patients/pulse_validator.rb
renalware-core-2.0.165 app/validators/renalware/patients/pulse_validator.rb
renalware-core-2.0.164 app/validators/renalware/patients/pulse_validator.rb
renalware-core-2.0.163 app/validators/renalware/patients/pulse_validator.rb
renalware-core-2.0.162 app/validators/renalware/patients/pulse_validator.rb
renalware-core-2.0.161 app/validators/renalware/patients/pulse_validator.rb
renalware-core-2.0.160 app/validators/renalware/patients/pulse_validator.rb
renalware-core-2.0.159 app/validators/renalware/patients/pulse_validator.rb
renalware-core-2.0.158 app/validators/renalware/patients/pulse_validator.rb
renalware-core-2.0.157 app/validators/renalware/patients/pulse_validator.rb
renalware-core-2.0.156 app/validators/renalware/patients/pulse_validator.rb
renalware-core-2.0.155 app/validators/renalware/patients/pulse_validator.rb
renalware-core-2.0.153 app/validators/renalware/patients/pulse_validator.rb
renalware-core-2.0.152 app/validators/renalware/patients/pulse_validator.rb
renalware-core-2.0.151 app/validators/renalware/patients/pulse_validator.rb
renalware-core-2.0.149 app/validators/renalware/patients/pulse_validator.rb
renalware-core-2.0.148 app/validators/renalware/patients/pulse_validator.rb