MCPcopy Index your code
hub / github.com/pyfa-org/Pyfa / _validateWithReason

Method _validateWithReason

gui/targetProfileEditor.py:45–53  ·  view source on GitHub ↗
(self, value)

Source from the content-addressed store, hash-verified

43class ResistValidator(InputValidator):
44
45 def _validateWithReason(self, value):
46 if not value:
47 return True, ''
48 value = strToFloat(value)
49 if value is None:
50 return False, _t('Incorrect formatting (decimals only)')
51 if value < 0 or value > 100:
52 return False, _t('Incorrect range (must be 0-100)')
53 return True, ''
54
55
56class TargetProfileNameValidator(BaseValidator):

Callers

nothing calls this directly

Calls 2

strToFloatFunction · 0.90
_tFunction · 0.50

Tested by

no test coverage detected