1
0
Fork 0
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

29 lines
1.3 KiB

diff --git a/app/models/account.rb b/app/models/account.rb
index 28bd828b0..d144ef540 100644
--- a/app/models/account.rb
+++ b/app/models/account.rb
@@ -92,7 +92,7 @@ class Account < ApplicationRecord
validates_with UnreservedUsernameValidator, if: -> { local? && will_save_change_to_username? && actor_type != 'Application' }
validates :display_name, length: { maximum: 30 }, if: -> { local? && will_save_change_to_display_name? }
validates :note, note_length: { maximum: 500 }, if: -> { local? && will_save_change_to_note? }
- validates :fields, length: { maximum: 4 }, if: -> { local? && will_save_change_to_fields? }
+ validates :fields, length: { maximum: 12 }, if: -> { local? && will_save_change_to_fields? }
scope :remote, -> { where.not(domain: nil) }
scope :local, -> { where(domain: nil) }
diff --git a/app/validators/poll_validator.rb b/app/validators/poll_validator.rb
index a32727796..b5e380cb4 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 = 12
+ MAX_OPTION_CHARS = 180
MAX_EXPIRATION = 1.month.freeze
MIN_EXPIRATION = 5.minutes.freeze