Permalink
Browse files

simplify league creation validation

  • Loading branch information...
1 parent f47660a commit 41909402fa15c90b28d42cd05b92978576a66c6a @artnez committed May 14, 2012
Showing with 3 additions and 10 deletions.
  1. +3 −10 src/faceoff/forms.py
View
@@ -73,20 +73,13 @@ class NewLeagueForm(Form):
name = TextField(
label='League Name',
id='name',
- validators=[
- Required(),
- Length(2),
- NoneOf(['new'], values_formatter=lambda v: map(str.lower, v))
- ]
+ validators=[Required(), Length(2)]
)
class SettingsForm(Form):
name = TextField(
label='League Name',
- validators=[
- Required(),
- Length(2),
- NoneOf(['new'], values_formatter=lambda v: map(str.lower, v))
- ]
+ validators=[Required(), Length(2)]
)
active = RadioField(label='Active?', choices=[('1', 'Yes'), ('0', 'No')])
+

0 comments on commit 4190940

Please sign in to comment.