Regex reject pattern from Fedibird
This commit is contained in:
parent
a65bdad2ca
commit
9ee03ac660
9 changed files with 57 additions and 1 deletions
|
|
@ -39,6 +39,7 @@ class Form::AdminSettings
|
|||
authorized_fetch
|
||||
app_icon
|
||||
favicon
|
||||
reject_pattern
|
||||
).freeze
|
||||
|
||||
INTEGER_KEYS = %i(
|
||||
|
|
@ -85,6 +86,7 @@ class Form::AdminSettings
|
|||
validates :show_domain_blocks_rationale, inclusion: { in: %w(disabled users all) }, if: -> { defined?(@show_domain_blocks_rationale) }
|
||||
validates :media_cache_retention_period, :content_cache_retention_period, :backups_retention_period, numericality: { only_integer: true }, allow_blank: true, if: -> { defined?(@media_cache_retention_period) || defined?(@content_cache_retention_period) || defined?(@backups_retention_period) }
|
||||
validates :site_short_description, length: { maximum: DESCRIPTION_LIMIT }, if: -> { defined?(@site_short_description) }
|
||||
validates :reject_pattern, regexp_syntax: true, if: -> { defined?(@reject_pattern) }
|
||||
validates :status_page_url, url: true, allow_blank: true
|
||||
validate :validate_site_uploads
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue