mirror of
https://github.com/wxWidgets/Phoenix.git
synced 2025-12-15 17:20:07 +01:00
Modified Validator to use string.ascii_letters rather than string.letters
This commit is contained in:
@@ -24,7 +24,7 @@ class MyValidator(wx.Validator):
|
||||
|
||||
if self.flag == ALPHA_ONLY:
|
||||
for x in val:
|
||||
if x not in string.letters:
|
||||
if x not in string.ascii_letters:
|
||||
return False
|
||||
|
||||
elif self.flag == DIGIT_ONLY:
|
||||
@@ -41,7 +41,7 @@ class MyValidator(wx.Validator):
|
||||
event.Skip()
|
||||
return
|
||||
|
||||
if self.flag == ALPHA_ONLY and chr(key) in string.letters:
|
||||
if self.flag == ALPHA_ONLY and chr(key) in string.ascii_letters:
|
||||
event.Skip()
|
||||
return
|
||||
|
||||
|
||||
Reference in New Issue
Block a user