diff options
Diffstat (limited to 'app/validators/poll_validator.rb')
-rw-r--r-- | app/validators/poll_validator.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/app/validators/poll_validator.rb b/app/validators/poll_validator.rb index a32727796..1aaf5a5d0 100644 --- a/app/validators/poll_validator.rb +++ b/app/validators/poll_validator.rb @@ -1,8 +1,8 @@ # frozen_string_literal: true class PollValidator < ActiveModel::Validator - MAX_OPTIONS = 4 - MAX_OPTION_CHARS = 50 + MAX_OPTIONS = (ENV['MAX_POLL_OPTIONS'] || 5).to_i + MAX_OPTION_CHARS = (ENV['MAX_POLL_OPTION_CHARS'] || 100).to_i MAX_EXPIRATION = 1.month.freeze MIN_EXPIRATION = 5.minutes.freeze |