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

Method validate

st2client/st2client/utils/interactive.py:157–164  ·  view source on GitHub ↗
(input, spec)

Source from the content-addressed store, hash-verified

155
156 @staticmethod
157 def validate(input, spec):
158 if input:
159 try:
160 input = float(input)
161 except ValueError as e:
162 raise validation.ValidationError(len(input), six.text_type(e))
163
164 super(NumberReader, NumberReader).validate(input, spec)
165
166 def _construct_template(self):
167 self.template = "{0} (float)"

Callers

nothing calls this directly

Calls 1

validateMethod · 0.45

Tested by

no test coverage detected