mirror of
https://github.com/wxWidgets/Phoenix.git
synced 2026-01-06 20:10:08 +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:
|
if self.flag == ALPHA_ONLY:
|
||||||
for x in val:
|
for x in val:
|
||||||
if x not in string.letters:
|
if x not in string.ascii_letters:
|
||||||
return False
|
return False
|
||||||
|
|
||||||
elif self.flag == DIGIT_ONLY:
|
elif self.flag == DIGIT_ONLY:
|
||||||
@@ -41,7 +41,7 @@ class MyValidator(wx.Validator):
|
|||||||
event.Skip()
|
event.Skip()
|
||||||
return
|
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()
|
event.Skip()
|
||||||
return
|
return
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user