Permalink
Browse files

pass on state value in validation.

  • Loading branch information...
ralphbean committed Nov 28, 2012
1 parent f849b5d commit 7c6791d802f854b8b1708e0928e24b889726989f
Showing with 2 additions and 2 deletions.
  1. +2 −2 tw2/core/validation.py
@@ -75,8 +75,8 @@ def message(self):
def safe_validate(validator, value, state=None):
try:
value = validator.to_python(value, state=None)
validator.validate_python(value, state=None)
value = validator.to_python(value, state=state)
validator.validate_python(value, state=state)
return value
except ValidationError:
return Invalid

0 comments on commit 7c6791d

Please sign in to comment.