Skip to content

Commit

Permalink
Enforce a minimum of 3 characters in titles, refs #270
Browse files Browse the repository at this point in the history
  • Loading branch information
carlobeltrame committed May 16, 2023
1 parent 22339c7 commit 42d410a
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ module ProposalWizardCreateStepFormOverride
clear_validators!
puts Decidim::Proposals::ProposalWizardCreateStepForm.validators.inspect

validates :title, presence: false
validates :title, length: { in: 0..150 }
validates :title, presence: true
validates :title, length: { in: 3..150 }
validates :body, presence: false, unless: ->(form) { form.override_validations? }
validates :body, proposal_length: {
minimum: 0,
Expand Down

0 comments on commit 42d410a

Please sign in to comment.