Skip to content

Commit

Permalink
Change: #900 メールアドレスの入力をオプション化 (#907)
Browse files Browse the repository at this point in the history
  • Loading branch information
kmycode authored Nov 13, 2024
1 parent 980074c commit 7b922c8
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions app/models/form/admin_settings.rb
Original file line number Diff line number Diff line change
Expand Up @@ -131,8 +131,7 @@ class Form::AdminSettings
attr_accessor(*KEYS)

validates :registrations_mode, inclusion: { in: %w(open approved none) }, if: -> { defined?(@registrations_mode) }
validates :site_contact_email, :site_contact_username, presence: true, if: -> { defined?(@site_contact_username) || defined?(@site_contact_email) }
validates :site_contact_username, existing_username: true, if: -> { defined?(@site_contact_username) }
validates :site_contact_username, presence: true, existing_username: true, if: -> { defined?(@site_contact_username) }
validates :bootstrap_timeline_accounts, existing_username: { multiple: true }, if: -> { defined?(@bootstrap_timeline_accounts) }
validates :show_domain_blocks, inclusion: { in: %w(disabled users all) }, if: -> { defined?(@show_domain_blocks) }
validates :show_domain_blocks_rationale, inclusion: { in: %w(disabled users all) }, if: -> { defined?(@show_domain_blocks_rationale) }
Expand Down

0 comments on commit 7b922c8

Please sign in to comment.