Added Form Authenticator
Includes the methods needed to verify the user inputs and to validate that they are correct.
This commit is contained in:
parent
c87a322dfb
commit
9a4f81ae1b
24
Controllers/FormAuthenticator/FormAuthenticator.cs
Normal file
24
Controllers/FormAuthenticator/FormAuthenticator.cs
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace EFB.Controllers.FormAuthenticator
|
||||||
|
{
|
||||||
|
public static class FormAuthenticator
|
||||||
|
{
|
||||||
|
|
||||||
|
public static bool ValidateEMail(string EMail){
|
||||||
|
if (EMail.Contains("@") && EMail.Contains(".") && !EMail.Contains(" "))
|
||||||
|
{
|
||||||
|
if (EMail.Count(x => x == '@') == 1)
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user