Project_Keywi/Project.Controller/InputSanitizer.cs

24 lines
759 B
C#

namespace Project.Controller;
public partial class InputSanitizer
{
//MasterLogin - Password Check
public static bool MasterLoginPasswordBool(string password)
{
if (string.IsNullOrEmpty(password) || password.Length < 6) return false;
else return true;
}
//MasterLogin - Email Check
public static bool MasterLoginEmailBool(string email)
{
if (string.IsNullOrEmpty(email)) return false;
if (email.Contains('@') && email.Length > 6) return true;
else return false;
}
//MasterLogin - Name Check
public static bool MasterLoginNameBool(string username)
{
if (string.IsNullOrEmpty(username) || username.Length < 4) return false;
else return true;
}
}