aboutsummaryrefslogtreecommitdiffstats
path: root/mediagoblin/submit/forms.py
diff options
context:
space:
mode:
authorCaleb Forbes Davis V <caldavis@gmail.com>2011-07-20 23:54:32 -0500
committerCaleb Forbes Davis V <caldavis@gmail.com>2011-07-21 00:02:57 -0500
commit909371cdceace162af880c275b9e6e70488e3029 (patch)
treebee23230d6ec4ea8fcc5918e0723c04af6845bfb /mediagoblin/submit/forms.py
parentcea8f2b632de13ca9b423ea97ee8f6abf3cd6ecb (diff)
downloadmediagoblin-909371cdceace162af880c275b9e6e70488e3029.tar.lz
mediagoblin-909371cdceace162af880c275b9e6e70488e3029.tar.xz
mediagoblin-909371cdceace162af880c275b9e6e70488e3029.zip
raises tag length error in form context instead of in message queue
Diffstat (limited to 'mediagoblin/submit/forms.py')
-rw-r--r--mediagoblin/submit/forms.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/mediagoblin/submit/forms.py b/mediagoblin/submit/forms.py
index 0e0fd086..1a5a7f4e 100644
--- a/mediagoblin/submit/forms.py
+++ b/mediagoblin/submit/forms.py
@@ -16,6 +16,7 @@
import wtforms
+from mediagoblin.util import tag_length_validator, TOO_LONG_TAG_WARNING
class SubmitStartForm(wtforms.Form):
@@ -24,4 +25,6 @@ class SubmitStartForm(wtforms.Form):
[wtforms.validators.Length(min=0, max=500)])
description = wtforms.TextAreaField('Description of this work')
file = wtforms.FileField('File')
- tags = wtforms.TextField('Tags')
+ tags = wtforms.TextField(
+ 'Tags',
+ [tag_length_validator])