Validating an email string in .net using EmailAddressAttribute, but not on an attribute

You could use the EmailAddressAttribute to do the validation.

The sealed means that you cannot create another class that inherits from it. Doesn't mean you cannot use it.

Created some unit tests and works fine

[TestMethod]
public void Should_Use_Email_Address_Attribute_To_Validate_Email() {
    var emailChecker = new System.ComponentModel.DataAnnotations.EmailAddressAttribute();
    string email = "[email protected]";
    bool isValid = emailChecker.IsValid(email);
    Assert.IsTrue(isValid);
}

[TestMethod]
public void Should_Use_Email_Address_Attribute_To_Invalidate_Email() {
    var emailChecker = new System.ComponentModel.DataAnnotations.EmailAddressAttribute();
    string email = "some@emai l.com";
    bool isValid = emailChecker.IsValid(email);
    Assert.IsFalse(isValid);
}