Show More
@@ -214,15 +214,14 b' class ThreadForm(PostForm):' | |||||
214 |
|
214 | |||
215 | tags = forms.CharField( |
|
215 | tags = forms.CharField( | |
216 | widget=forms.TextInput(attrs={ATTRIBUTE_PLACEHOLDER: TAGS_PLACEHOLDER}), |
|
216 | widget=forms.TextInput(attrs={ATTRIBUTE_PLACEHOLDER: TAGS_PLACEHOLDER}), | |
217 | max_length=100, label=_('Tags')) |
|
217 | max_length=100, label=_('Tags'), required=True) | |
218 |
|
218 | |||
219 | def clean_tags(self): |
|
219 | def clean_tags(self): | |
220 | tags = self.cleaned_data['tags'].strip() |
|
220 | tags = self.cleaned_data['tags'].strip() | |
221 |
|
221 | |||
222 | if tags: |
|
222 | if not tags or not self.regex_tags.match(tags): | |
223 | if not self.regex_tags.match(tags): |
|
223 | raise forms.ValidationError( | |
224 | raise forms.ValidationError( |
|
224 | _('Inappropriate characters in tags.')) | |
225 | _('Inappropriate characters in tags.')) |
|
|||
226 |
|
225 | |||
227 | return tags |
|
226 | return tags | |
228 |
|
227 |
General Comments 0
You need to be logged in to leave comments.
Login now