fix: rename function

This commit is contained in:
hydrogen 2020-12-04 16:53:00 +02:00 committed by Iuri Matias
parent fad0bb858e
commit 020c1b0bc3
2 changed files with 3 additions and 4 deletions

View File

@ -198,8 +198,7 @@ QtObject {
} }
} }
function validate(item, firstPasswordField, repeatPasswordField) { function validatePasswords(item, firstPasswordField, repeatPasswordField) {
console.log("validate");
switch (item) { switch (item) {
case "first": case "first":
if (firstPasswordField.text === "") { if (firstPasswordField.text === "") {

View File

@ -34,7 +34,7 @@ ModalPopup {
validationError: popup.passwordValidationError validationError: popup.passwordValidationError
onTextChanged: { onTextChanged: {
[firstPasswordFieldValid, passwordValidationError] = [firstPasswordFieldValid, passwordValidationError] =
Utils.validate("first", firstPasswordField, repeatPasswordField); Utils.validatePasswords("first", firstPasswordField, repeatPasswordField);
} }
} }
@ -56,7 +56,7 @@ ModalPopup {
} }
onTextChanged: { onTextChanged: {
[repeatPasswordFieldValid, repeatPasswordValidationError] = [repeatPasswordFieldValid, repeatPasswordValidationError] =
Utils.validate("repeat", firstPasswordField, repeatPasswordField); Utils.validatePasswords("repeat", firstPasswordField, repeatPasswordField);
} }
} }