mirror of
https://github.com/pretix/pretix.git
synced 2026-08-25 13:12:00 +00:00
Questions: add min-length to string/text type questions (#6488)
* Questions: add min-length to string/text type questions * fix test
This commit is contained in:
@@ -708,6 +708,7 @@ class BaseQuestionsForm(forms.Form):
|
||||
elif q.type == Question.TYPE_STRING:
|
||||
field = forms.CharField(
|
||||
label=escape(q.question), required=required,
|
||||
min_length=q.valid_string_length_min,
|
||||
max_length=q.valid_string_length_max,
|
||||
help_text=rich_text(q.help_text),
|
||||
initial=initial.answer if initial else None,
|
||||
@@ -715,6 +716,7 @@ class BaseQuestionsForm(forms.Form):
|
||||
elif q.type == Question.TYPE_TEXT:
|
||||
field = forms.CharField(
|
||||
label=escape(q.question), required=required,
|
||||
min_length=q.valid_string_length_min,
|
||||
max_length=q.valid_string_length_max,
|
||||
help_text=rich_text(q.help_text),
|
||||
widget=forms.Textarea,
|
||||
|
||||
Reference in New Issue
Block a user