diff --git a/src/wwwroot/controllers/RegistrationCtrl.js b/src/wwwroot/controllers/RegistrationCtrl.js index a38bc9cc..63cc96ac 100644 --- a/src/wwwroot/controllers/RegistrationCtrl.js +++ b/src/wwwroot/controllers/RegistrationCtrl.js @@ -92,6 +92,10 @@ if (result.validationError) { if (result.passwordInvalid) { utils.setServerValidationToField($scope, $scope.form.password, 'strength'); + } else if (result.accountNameAlreadyTaken) { + utils.setServerValidationToField($scope, $scope.form.accountName, 'accountname_already_taken'); + } else if (result.emailAlreadyExists) { + utils.setServerValidationToField($scope, $scope.form.email, 'email_already_exist'); } return; } diff --git a/src/wwwroot/services/clerk.js b/src/wwwroot/services/clerk.js index 67196a6e..3ed6afdc 100644 --- a/src/wwwroot/services/clerk.js +++ b/src/wwwroot/services/clerk.js @@ -200,6 +200,12 @@ case 'password': result.passwordInvalid = true; break; + case 'account_name': + result.accountNameAlreadyTaken = true; + break; + case 'user_email': + result.emailAlreadyExists = true; + break; } }); } else {