Skip to content

Commit

Permalink
Vérifie que la date de fin de la PFMP est supérieur à la date du jour
Browse files Browse the repository at this point in the history
  • Loading branch information
tnicolas1 committed Nov 22, 2024
1 parent e29bec5 commit 9bbfacf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/models/pfmp.rb
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ class Pfmp < ApplicationRecord # rubocop:disable Metrics/ClassLength
}

validates :end_date,
comparison: { greater_than_or_equal_to: :start_date },
comparison: { greater_than_or_equal_to: [:start_date, Time.zone.today] },
if: -> { start_date && end_date }

validates :amount, numericality: { only_integer: true, allow_nil: true, greater_than_or_equal_to: 0 }
Expand Down

0 comments on commit 9bbfacf

Please sign in to comment.