diff --git a/src/Web/Grand.Web/Validators/Customer/LoginValidator.cs b/src/Web/Grand.Web/Validators/Customer/LoginValidator.cs
index 45f43d00b..9dbbaa542 100644
--- a/src/Web/Grand.Web/Validators/Customer/LoginValidator.cs
+++ b/src/Web/Grand.Web/Validators/Customer/LoginValidator.cs
@@ -16,10 +16,15 @@ public LoginValidator(
{
if (!customerSettings.UsernamesEnabled)
{
- //login by email
RuleFor(x => x.Email).NotEmpty().WithMessage(translationService.GetResource("Account.Login.Fields.Email.Required"));
+ RuleFor(x => x.Password).NotEmpty().WithMessage(translationService.GetResource("Account.Login.Fields.Password.Required"));
RuleFor(x => x.Email).EmailAddress().WithMessage(translationService.GetResource("Common.WrongEmail"));
}
+ else
+ {
+ RuleFor(x => x.Username).NotEmpty().WithMessage(translationService.GetResource("Account.Login.Fields.UserName.Required"));
+ RuleFor(x => x.Password).NotEmpty().WithMessage(translationService.GetResource("Account.Login.Fields.Password.Required"));
+ }
}
}
}
\ No newline at end of file
diff --git a/src/Web/Grand.Web/Views/Account/AddressAdd.cshtml b/src/Web/Grand.Web/Views/Account/AddressAdd.cshtml
index e6c82c0c5..50094a399 100644
--- a/src/Web/Grand.Web/Views/Account/AddressAdd.cshtml
+++ b/src/Web/Grand.Web/Views/Account/AddressAdd.cshtml
@@ -12,19 +12,21 @@
@await Component.InvokeAsync("CustomerNavigation", new { selectedTabId = AccountNavigationEnum.Addresses })
}