Sha256: 9cfbcbe8880c84ea62d354e5d8d089529f8c30a1a3be7550771c553ee1d1d9f2

Contents?: true

Size: 509 Bytes

Versions: 35

Compression:

Stored size: 509 Bytes

Contents

module Renalware
  module Patients
    class BmStixValidator < ActiveModel::EachValidator
      include NumericRangeValidations
      include NumericScaleValidations
      MIN_VALUE = 0.5
      MAX_VALUE = 50
      MAX_DECIMAL_PLACES = 1

      def validate_each(record, attribute, value)
        return if value.blank?
        validate_number_is_in_range(record, attribute, value, MIN_VALUE, MAX_VALUE)
        validate_numeric_scale(record, attribute, value, MAX_DECIMAL_PLACES)
      end
    end
  end
end

Version data entries

35 entries across 35 versions & 1 rubygems

Version Path
renalware-core-2.0.16 app/validators/renalware/patients/bm_stix_validator.rb
renalware-core-2.0.15 app/validators/renalware/patients/bm_stix_validator.rb
renalware-core-2.0.14 app/validators/renalware/patients/bm_stix_validator.rb
renalware-core-2.0.13 app/validators/renalware/patients/bm_stix_validator.rb
renalware-core-2.0.12 app/validators/renalware/patients/bm_stix_validator.rb
renalware-core-2.0.11 app/validators/renalware/patients/bm_stix_validator.rb
renalware-core-2.0.9 app/validators/renalware/patients/bm_stix_validator.rb
renalware-core-2.0.8 app/validators/renalware/patients/bm_stix_validator.rb
renalware-core-2.0.7 app/validators/renalware/patients/bm_stix_validator.rb
renalware-core-2.0.5 app/validators/renalware/patients/bm_stix_validator.rb
renalware-core-2.0.4 app/validators/renalware/patients/bm_stix_validator.rb
renalware-core-2.0.3 app/validators/renalware/patients/bm_stix_validator.rb
renalware-core-2.0.2 app/validators/renalware/patients/bm_stix_validator.rb
renalware-core-2.0.1 app/validators/renalware/patients/bm_stix_validator.rb
renalware-core-2.0.0 app/validators/renalware/patients/bm_stix_validator.rb
renalware-core-2.0.0.pre.rc13 app/validators/renalware/patients/bm_stix_validator.rb
renalware-core-2.0.0.pre.rc11 app/validators/renalware/patients/bm_stix_validator.rb
renalware-core-2.0.0.pre.rc10 app/validators/renalware/patients/bm_stix_validator.rb
renalware-core-2.0.0.pre.rc9 app/validators/renalware/patients/bm_stix_validator.rb
renalware-core-2.0.0.pre.rc8 app/validators/renalware/patients/bm_stix_validator.rb