Merge remote branch 'origin/dev' into dev
This commit is contained in:
commit
7cb24446ec
@ -640,8 +640,8 @@ class BaseDocument(object):
|
||||
try:
|
||||
field._validate(value)
|
||||
except (ValueError, AttributeError, AssertionError), e:
|
||||
raise ValidationError('Invalid value for field of type "%s": %s'
|
||||
% (field.__class__.__name__, value))
|
||||
raise ValidationError('Invalid value for field named "%s" of type "%s": %s'
|
||||
% (field.name, field.__class__.__name__, value))
|
||||
elif field.required:
|
||||
raise ValidationError('Field "%s" is required' % field.name)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user