43 lines
1.3 KiB
C#
43 lines
1.3 KiB
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.Contains('.')) 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;
|
|
}
|
|
|
|
//NewEntry - Name Check
|
|
public static bool EntryName(string name)
|
|
{
|
|
if (string.IsNullOrEmpty(name)) return false;
|
|
else return true;
|
|
}
|
|
//NewEntry - user/mailcheck
|
|
public static bool Userormail(string usermail)
|
|
{
|
|
if (string.IsNullOrEmpty(usermail)) return false;
|
|
else return true;
|
|
}
|
|
//NewEntry - password check
|
|
public static bool Password(string pass)
|
|
{
|
|
if (string.IsNullOrEmpty(pass) || pass.Length < 6) return false;
|
|
else return true;
|
|
}
|
|
} |