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

Method validate

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

Source from the content-addressed store, hash-verified

182
183 @staticmethod
184 def validate(input, spec):
185 if input:
186 try:
187 input = int(input)
188 except ValueError as e:
189 raise validation.ValidationError(len(input), six.text_type(e))
190
191 super(IntegerReader, IntegerReader).validate(input, spec)
192
193 def _construct_template(self):
194 self.template = "{0} (integer)"

Callers

nothing calls this directly

Calls 1

validateMethod · 0.45

Tested by

no test coverage detected