MCPcopy Create free account
hub / github.com/NSLS2/PyXRF / validate

Method validate

pyxrf/gui_module/useful_widgets.py:397–403  ·  view source on GitHub ↗
(self, text, pos)

Source from the content-addressed store, hash-verified

395 """
396
397 def validate(self, text, pos):
398 result = super().validate(text, pos)
399 # Additional condition: the number can not contain ",". For some reason
400 # the standard validators ignore commas at the end of the number.
401 if "," in text[pos:]:
402 result = (QIntValidator.Invalid, result[1], result[2])
403 return result
404
405
406class IntValidatorRelaxed(IntValidatorStrict):

Calls

no outgoing calls