private static string CheckPassword(string password) { if (password == "-1") { return(password);//if the user want to go back to the menu } else { bool temp = kanban.IsValidPassword(password); if (temp) { return(password); } else// if the password is invalid { Console.ForegroundColor = ConsoleColor.Red; Log.Warn("Invalid input: password do not contain the requested elements"); Console.WriteLine("please enter a valid password, make sure it has valid length and includes all the requested characters."); Console.ResetColor(); Console.Write("Password : "); password = Console.ReadLine(); return(CheckPassword(password)); } } }
public bool IsValidPassword(string password) { return(kanban.IsValidPassword(password)); }