mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-05-20 10:34:30 +00:00
mediawiki: Add regex validator to the domain field
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
This commit is contained in:
parent
26f576bb79
commit
0d37809eb8
@ -34,7 +34,8 @@ class MediaWikiForm(forms.Form): # pylint: disable=W0232
|
|||||||
label=_('Domain'), required=False, help_text=_(
|
label=_('Domain'), required=False, help_text=_(
|
||||||
'Used by MediaWiki to generate URLs that point to the wiki '
|
'Used by MediaWiki to generate URLs that point to the wiki '
|
||||||
'such as in footer, feeds and emails. Examples: '
|
'such as in footer, feeds and emails. Examples: '
|
||||||
'"myfreedombox.example.org" or "example.onion".'))
|
'"myfreedombox.example.org" or "example.onion".'),
|
||||||
|
validators=[validators.RegexValidator('[$"]', inverse_match=True)])
|
||||||
|
|
||||||
site_name = forms.CharField(
|
site_name = forms.CharField(
|
||||||
label=_('Site Name'), required=False,
|
label=_('Site Name'), required=False,
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user