I have a number of wxPython textCtrls that are used for data input. Use is made of various Validators to make sure the data is of the correct type. I now need to validate that the data is within range, e.g. where two textCtrls are used for feet and inches that the inches are less than 12, before the user can move to the next field. I did try wx.lib.intctrl.IntValidator() but seemed to have an issue because I am using Python 2.7 and wxPython 2.8. This must be a problem for others but a Google has not found anything.
Bind the textctrl to wx.EVT_KILL_FOCUS and then check the contents of the textctrl. If there is invalid input, issue your error message and then self.my_textCtrl.SetFocus() which will put you back in the textctrl for input again.
Validating wx.textCtrl Field For Sensible Values