Skip to content

Commit

Permalink
Fix failing spec
Browse files Browse the repository at this point in the history
Co-authored-by: Hugo Melo <[email protected]>
  • Loading branch information
squanto committed Feb 12, 2025
1 parent 4eed19a commit 28a4708
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions app/models/az322_contribution.rb
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,11 @@ class Az322Contribution < ApplicationRecord
accepts_nested_attributes_for :state_file_az_intake, update_only: true

validates :school_name, presence: true
validates :ctds_code, presence: true, format: { with: /\A\d{9}\z/, message: -> (_object, _data) { I18n.t("validators.ctds_code") }}
validates :ctds_code, presence: true, format: { with: /\A\d{9}\z/, message: ->(_object, _data) { I18n.t("validators.ctds_code") }}
validates :district_name, presence: true
validates :amount, presence: true, numericality: { greater_than: 0 }
validates :date_of_contribution,
inclusion: {
in: TAX_YEAR.beginning_of_year..TAX_YEAR.end_of_year
},
presence: true
}
end

0 comments on commit 28a4708

Please sign in to comment.