MCPcopy Create free account
hub / github.com/StackStorm/st2 / validate

Method validate

st2common/st2common/fields.py:150–153  ·  view source on GitHub ↗
(self, value)

Source from the content-addressed store, hash-verified

148 return super(ComplexDateTimeField, self).__set__(instance, value)
149
150 def validate(self, value):
151 value = self.to_python(value)
152 if not isinstance(value, datetime.datetime):
153 self.error("Only datetime objects may used in a " "ComplexDateTimeField")
154
155 def to_python(self, value):
156 original_value = value

Callers

nothing calls this directly

Calls 1

to_pythonMethod · 0.95

Tested by

no test coverage detected