Skip to content

Commit

Permalink
review fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Hidanio committed Feb 8, 2024
1 parent e161fdb commit 4e890e2
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/main/kotlin/com/vk/admstorm/ssh/EnterPasswordDialog.kt
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,8 @@ class EnterPasswordDialog(project: Project) : DialogWrapper(project, true, IdeMo
init()

myPasswordInput.addKeyListener(object : KeyAdapter() {
override fun keyTyped(e: KeyEvent) {
val char = e.keyChar
if (!char.isLetterOrDigit() || char in 'А'..'я') {
override fun keyReleased(e: KeyEvent) {
if (getPassword().any { it in 'А'..'я' || it == 'ё' || it == 'Ё' }) {
warningLabel.text = "PIN should contain only English characters and numbers!"
} else {
warningLabel.text = ""
Expand Down

0 comments on commit 4e890e2

Please sign in to comment.