Skip to content
Snippets Groups Projects
Commit 112784fc authored by xamgore's avatar xamgore
Browse files

Extra check on passwords length

parent ba47f806
Branches
Tags
No related merge requests found
...@@ -75,12 +75,12 @@ function onSettingsPopup() { ...@@ -75,12 +75,12 @@ function onSettingsPopup() {
var pConfirm = $inputPwdConfirm.val(); var pConfirm = $inputPwdConfirm.val();
var pNew = $inputPwdNew.val(); var pNew = $inputPwdNew.val();
if (pCurrent === '') { if (pCurrent.length < 5) {
$inputPwdCurrent.focus(); $inputPwdCurrent.focus();
return; return;
} }
if (pNew === '') { if (pNew.length < 5) {
$inputPwdNew.focus(); $inputPwdNew.focus();
return; return;
} }
...@@ -106,7 +106,7 @@ function onSettingsPopup() { ...@@ -106,7 +106,7 @@ function onSettingsPopup() {
$changePassBut.text('Ошибка!').addClass('Error').removeAttr('disabled'); $changePassBut.text('Ошибка!').addClass('Error').removeAttr('disabled');
} }
$inputPwdCurrent $inputPwdCurrent.focus()
.add($inputPwdConfirm) .add($inputPwdConfirm)
.add($inputPwdNew) .add($inputPwdNew)
.val(''); .val('');
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment