MCPcopy Index your code
hub / github.com/MongoEngine/mongoengine / error

Method error

mongoengine/base/fields.py:212–215  ·  view source on GitHub ↗

Raise a ValidationError.

(self, message="", errors=None, field_name=None)

Source from the content-addressed store, hash-verified

210 instance._data[self.name] = value
211
212 def error(self, message="", errors=None, field_name=None):
213 """Raise a ValidationError."""
214 field_name = field_name if field_name else self.name
215 raise ValidationError(message, errors=errors, field_name=field_name)
216
217 def to_python(self, value):
218 """Convert a MongoDB-compatible type to a Python type."""

Callers 15

_validate_choicesMethod · 0.95
_validateMethod · 0.95
validateMethod · 0.80
validateMethod · 0.80
validateMethod · 0.80
validateMethod · 0.80
validateMethod · 0.80
__init__Method · 0.80
validateMethod · 0.80
validateMethod · 0.80
validateMethod · 0.80
validateMethod · 0.80

Calls 1

ValidationErrorClass · 0.90

Tested by

no test coverage detected