diff --git a/mvc/models/ModelStateError/Controllers/ContactsController.cs b/mvc/models/ModelStateError/Controllers/ContactsController.cs index 82b493d..4e37554 100644 --- a/mvc/models/ModelStateError/Controllers/ContactsController.cs +++ b/mvc/models/ModelStateError/Controllers/ContactsController.cs @@ -56,7 +56,7 @@ public class ContactsController : Controller // Attach Validation Error Message to the Model if seen if (_context.Contact.Any(i => i.PhoneNumber == contact.PhoneNumber)) { - ModelState.AddModelError(nameof(contact.PhoneNumber), "The Name is already in use."); + ModelState.AddModelError(nameof(contact.PhoneNumber), "The Phone number is already in use."); } if (_context.Contact.Any(i => i.Email == contact.Email)) { @@ -104,7 +104,7 @@ public class ContactsController : Controller if (_context.Contact.Any(i => i.PhoneNumber == contact.PhoneNumber)) { - ModelState.AddModelError(nameof(contact.PhoneNumber), "The Name is already in use."); + ModelState.AddModelError(nameof(contact.PhoneNumber), "The Phone number is already in use."); } if (_context.Contact.Any(i => i.Email == contact.Email)) @@ -155,7 +155,7 @@ public class ContactsController : Controller } // - // POST: Contacts/Delete/5 + // POST: Contacts/Delete/5 [HttpPost, ActionName("Delete")] [ValidateAntiForgeryToken] public async Task DeleteConfirmed(int id)