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) {
console.log("validate");
function validatePasswords(item, firstPasswordField, repeatPasswordField) {
switch (item) {
case "first":
if (firstPasswordField.text === "") {

View File

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