Skip to content
This repository has been archived by the owner on Apr 19, 2021. It is now read-only.

电子邮件验证可以是中文吗? #19

Open
waleswood opened this issue May 13, 2015 · 0 comments
Open

电子邮件验证可以是中文吗? #19

waleswood opened this issue May 13, 2015 · 0 comments

Comments

@waleswood
Copy link

OSharp.Utility.Extensions命名空间下的

    /// <summary>
    /// 是否电子邮件
    /// </summary>
    public static bool IsEmail(this string value)
    {
        const string pattern = @"^[\w-]+(\.[\w-]+)*@[\w-]+(\.[\w-]+)+$";
        return value.IsMatch(pattern);
    }

没有对中文的非法判断。

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant