@ -7,6 +7,7 @@ class Form::Sales::Questions::Buyer1Income < ::Form::Question
@type = "numeric"
@page = page
@min = 0
@max = 999_999
@step = 1
@width = 5
@prefix = "£"
@ -1,5 +1,6 @@
class SalesLogValidator < ActiveModel::Validator
include Validations::Sales::HouseholdValidations
include Validations::SharedValidations
def validate(record)
validation_methods = public_methods.select { |method| method.starts_with?("validate_") }
@ -54,4 +54,8 @@ RSpec.describe Form::Sales::Questions::Buyer1Income, type: :model do
it "has the correct check_answers_card_number" do
expect(question.check_answers_card_number).to eq(1)
end
it "has correct max" do
expect(question.max).to eq(999_999)