Browse files


  • Loading branch information...
1 parent 170c56b commit ef172712da915e4563fbb39f70406d305e96ca13 @flosch flosch committed Apr 16, 2010
Showing with 1 addition and 1 deletion.
  1. +1 −1 mongoengine/
@@ -79,7 +79,7 @@ def validate(self, value):
"""Perform validation on a value.
if self.validation is not None:
- if isinstance(self.validation, list):
+ if isinstance(self.validation, list) and value not in self.validation:
raise ValidationError('Value not in validation list.')
elif callable(self.validation) and not self.validation(value):
raise ValidationError('Value does not match custom validation method.')

0 comments on commit ef17271

Please sign in to comment.