app/forms/decidim/initiatives/vote_form.rb in decidim-initiatives-0.23.2 vs app/forms/decidim/initiatives/vote_form.rb in decidim-initiatives-0.23.3
- old
+ new
@@ -22,9 +22,11 @@
attribute :initiative, Decidim::Initiative
attribute :signer, Decidim::User
validates :initiative, :signer, presence: true
+ validates :authorized_scopes, presence: true
+
with_options if: :required_personal_data? do
validates :name_and_surname, :document_number, :date_of_birth, :postal_code, :encrypted_metadata, :hash_id, presence: true
validate :document_number_authorized?
validate :already_voted?
end