优化常量设置&新增导入用户方法
This commit is contained in:
@@ -80,6 +80,19 @@ namespace ZR.Common
|
||||
return false;
|
||||
}
|
||||
}
|
||||
public static bool CheckUserName(string str)
|
||||
{
|
||||
try
|
||||
{
|
||||
string rg = @"^[a-z][a-z0-9-_]*$";
|
||||
return Regex.IsMatch(str, rg);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Console.WriteLine(ex.Message);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 计算密码强度
|
||||
|
||||
Reference in New Issue
Block a user