def error(self, message="", errors=None, field_name=None):
        field_name = field_name if field_name else self.name
        raise ValidationError(message, errors=errors, field_name=field_name)
Raises a ValidationError.
dataset/ETHPy150Open MongoEngine/mongoengine/mongoengine/base/fields.py/BaseField.error