private static string CheckEmail(string email) { if (email == "-1") { return(email); } else { bool temp = kanban.IsValidEmail(email) && kanban.IsUniqueEmail(email); if (temp) { return(email); } else { Console.ForegroundColor = ConsoleColor.Red; Log.Warn("Invalid input: email isnt a valid email or already been used in the system"); Console.WriteLine("please enter a valid email address and make sure it hasn't been used in this system before."); Console.ResetColor(); Console.Write("EmailAddress : "); email = Console.ReadLine(); return(CheckEmail(email)); } } }
public bool IsValidEmail(string email) { return(kanban.IsValidEmail(email)); }