diff options
author | Caleb Forbes Davis V <caldavis@gmail.com> | 2011-07-20 23:54:32 -0500 |
---|---|---|
committer | Caleb Forbes Davis V <caldavis@gmail.com> | 2011-07-21 00:02:57 -0500 |
commit | 909371cdceace162af880c275b9e6e70488e3029 (patch) | |
tree | bee23230d6ec4ea8fcc5918e0723c04af6845bfb /mediagoblin/submit/forms.py | |
parent | cea8f2b632de13ca9b423ea97ee8f6abf3cd6ecb (diff) | |
download | mediagoblin-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.py | 5 |
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]) |