app/forms/decidim/meetings/close_meeting_form.rb in decidim-meetings-0.24.3 vs app/forms/decidim/meetings/close_meeting_form.rb in decidim-meetings-0.25.0.rc1

- old
+ new

@@ -6,11 +6,15 @@ class CloseMeetingForm < Decidim::Form attribute :closing_report, String attribute :proposal_ids, Array[Integer] attribute :proposals attribute :closed_at, Decidim::Attributes::TimeWithZone, default: ->(_form, _attribute) { Time.current } + attribute :attendees_count, Integer, default: 0 validates :closing_report, presence: true + validates :attendees_count, + presence: true, + numericality: { greater_than_or_equal_to: 0, only_integer: true } # Private: Gets the proposals from the meeting and injects them to the form. # # Returns nothing. def map_model(model)