Skip to content

Commit

Permalink
Bump poll options limit from 4 to 20
Browse files Browse the repository at this point in the history
  • Loading branch information
progval committed Jul 4, 2024
1 parent aad67f3 commit 6c15d8e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ class PollForm extends ImmutablePureComponent {
</ul>

<div className='poll__footer'>
<button type='button' disabled={options.size >= 4} className='button button-secondary' onClick={this.handleAddOption}><Icon id='plus' /> <FormattedMessage {...messages.add_option} /></button>
<button type='button' disabled={options.size >= 20} className='button button-secondary' onClick={this.handleAddOption}><Icon id='plus' /> <FormattedMessage {...messages.add_option} /></button>

{/* eslint-disable-next-line jsx-a11y/no-onchange */}
<select value={expiresIn} onChange={this.handleSelectDuration}>
Expand Down
2 changes: 1 addition & 1 deletion app/validators/poll_validator.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# frozen_string_literal: true

class PollValidator < ActiveModel::Validator
MAX_OPTIONS = 4
MAX_OPTIONS = 20
MAX_OPTION_CHARS = 50
MAX_EXPIRATION = 1.month.freeze
MIN_EXPIRATION = 5.minutes.freeze
Expand Down

0 comments on commit 6c15d8e

Please sign in to comment.