diff --git a/Project-Unite/Controllers/AccountController.cs b/Project-Unite/Controllers/AccountController.cs index a80639d..a315a6f 100644 --- a/Project-Unite/Controllers/AccountController.cs +++ b/Project-Unite/Controllers/AccountController.cs @@ -183,7 +183,7 @@ public async Task Register(RegisterViewModel model) { if(temp.Users.FirstOrDefault(x=>x.DisplayName==model.Username) != null) { - ModelState.AddModelError("Your display name is already taken."); + ModelState.AddModelError("Username", new Exception("Your display name is already taken.")); return View(model); } }