| 123456789101112131415161718 | using System.Text.RegularExpressions;
namespace UnivateProperties_API.Helpers
{
    public static class MyCommon
    {
        public static bool IsValidEmail(string item)
        {
            if (!string.IsNullOrEmpty(item))
            {
                Regex regex = new Regex(@"^([\w\.\-]+)@([\w\-]+)((\.(\w){2,3})+)$");
                Match match = regex.Match(item);
                return match.Success;
            }
            else return false;
        }
    }
}
 |