MCPcopy Index your code
hub / github.com/apache/cassandra-python-driver / validate

Method validate

cassandra/cqlengine/columns.py:228–236  ·  view source on GitHub ↗

Returns a cleaned and validated value. Raises a ValidationError if there's a problem

(self, value)

Source from the content-addressed store, hash-verified

226 return id(self)
227
228 def validate(self, value):
229 """
230 Returns a cleaned and validated value. Raises a ValidationError
231 if there's a problem
232 """
233 if value is None:
234 if self.required:
235 raise ValidationError('{0} - None values are not allowed'.format(self.column_name or self.db_field))
236 return value
237
238 def to_python(self, value):
239 """

Callers

nothing calls this directly

Calls 1

ValidationErrorClass · 0.90

Tested by

no test coverage detected