app/models/tramway/event/participant_form_field.rb in tramway-event-1.9.31 vs app/models/tramway/event/participant_form_field.rb in tramway-event-1.9.31.1
- old
+ new
@@ -4,6 +4,10 @@
belongs_to :event, class_name: 'Tramway::Event::Event'
enumerize :field_type, in: %i[text string numeric date_picker select], default: :text
scope :inputs_list, -> { active.order(position: :asc) }
+
+ def required
+ options&.dig('validations', 'presence') == 'true'
+ end
end