Subject: EmailValidator passes invalid emails even Syntax
Date: 2014-08-04 01:16:59
From: Brett Wass
Source: emailvalidator-passes-invalid-emails-even-syntax
----------------------------------------------------------------------

Hi,

I am sure I am doing something wrong but I have an application which acts as an interface between two systems and we want to validate the email addresses being passed.  Initially we just want to validate for syntax (e.g. something@nothing.com is valid but somethingnothing.com is not) however the Email Validator passes any input as valid.

Here is the code I am executing...

[code lang='c#']
      static void Main(string[] args)
        {
            EmailValidator ev = new EmailValidator();
            ev.ValidationLevel = ValidationLevel.Syntax;
            ValidationLevel evResult = ev.Validate("bad email address");
            Console.WriteLine(evResult.ToString());
            Tools.ConsolePauseForKeyPress("Press any key...");
        }
[/code]
And the result I always get is Syntax.  Am I missing something?  How do I just validate an email address based on Syntax?

---------------------------------------------------------------------- Note: This question has been asked on the Q&A forum of Thang Dang's fraudulent ComponentPro brand If you purchased anything from ComponentPro, you have been scammed. Contact the payment processor who sold you the license and ask for your money back. Back to ComponentPro Q&A Forum Index