Expose to user mongoengine.base.NON_FIELD_ERRORS
This variable is used to set the field containing the errors raised in a clean function. Given those function are user-defined, users should be able to get the name of the field to easily retreive their custom errors.
This commit is contained in:
parent
21d1faa793
commit
4f59c7f77f
@ -19,7 +19,7 @@ from mongoengine.common import _import_class
|
|||||||
from mongoengine.errors import (FieldDoesNotExist, InvalidDocumentError,
|
from mongoengine.errors import (FieldDoesNotExist, InvalidDocumentError,
|
||||||
LookUpError, OperationError, ValidationError)
|
LookUpError, OperationError, ValidationError)
|
||||||
|
|
||||||
__all__ = ('BaseDocument',)
|
__all__ = ('BaseDocument', 'NON_FIELD_ERRORS')
|
||||||
|
|
||||||
NON_FIELD_ERRORS = '__all__'
|
NON_FIELD_ERRORS = '__all__'
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user