Show good error message for invalid username

This commit is contained in:
Girish Ramakrishnan
2016-10-17 19:02:48 -07:00
parent 0a7303e50d
commit 6b72ee61f9
2 changed files with 2 additions and 2 deletions

View File

@@ -125,7 +125,7 @@ angular.module('Application').controller('UsersController', ['$scope', '$locatio
$scope.useradd_form.email.$setPristine();
$('#inputUserAddEmail').focus();
} else if (error.message.toLowerCase().indexOf('username') !== -1) {
$scope.useradd.error.username = 'Invalid Username';
$scope.useradd.error.username = error.message;
$scope.useradd_form.username.$setPristine();
$('#inputUserAddUsername').focus();
} else {