Skip to content
Permalink
Fetching contributors…
Cannot retrieve contributors at this time
27 lines (23 sloc) 583 Bytes
using System;
using System.Collections.Generic;
using System.Text;
using System.Text.RegularExpressions;
namespace RefactoredGameProject
{
public class LoginValidator
{
string LoginPattern = @"(?=.*[A-Za-z0-9]$)[A-Za-z][A-Za-z\d.-]{0,19}";
public bool LoginValidate(string login)
{
Match loginmatchresult = Regex.Match(login, LoginPattern);
if (loginmatchresult.Success)
{
return true;
}
else
{
return false;
}
}
}
}
You can’t perform that action at this time.