module Validations::Sales::SaleInformationValidations def validate_deposit_range(record) return if record.deposit.blank? unless record.deposit >= 0 && record.deposit <= 999_999 record.errors.add :deposit, "Cash deposit must be £0 - £999,999" end end end