Changes revalidation of username and password.
Ensures that both inputs are revalidated on change(if the form is invalid) to avoid cases where changing your password doesn't reset $invalid and therefor doesn't allow you to resubmit the form without triggering a change in the username.
This commit is contained in:
@@ -303,12 +303,14 @@
|
||||
// while the form is invalid, then revalidate them so that the form can
|
||||
// be submitted again.
|
||||
$scope.loginForm.username.$viewChangeListeners.push(function () {
|
||||
if ($scope.loginForm.username.$invalid) {
|
||||
if ($scope.loginForm.$invalid) {
|
||||
$scope.loginForm.username.$setValidity('auth', true);
|
||||
$scope.loginForm.password.$setValidity('auth', true);
|
||||
}
|
||||
});
|
||||
$scope.loginForm.password.$viewChangeListeners.push(function () {
|
||||
if ($scope.loginForm.password.$invalid) {
|
||||
if ($scope.loginForm.$invalid) {
|
||||
$scope.loginForm.username.$setValidity('auth', true);
|
||||
$scope.loginForm.password.$setValidity('auth', true);
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user