public void DutchPhoneNumberValidator_Attribute_NamedValidator()
        {
            TestDummy_NamedValidator dummy = new TestDummy_NamedValidator {
                PhoneNumber = "0582151740"
            };

            EntLib.ValidationResults results = EntLib.Validation.Validate(dummy, "ValidationTest");
            Assert.IsFalse(results.IsValid);
        }
Exemple #2
0
        public void EmailValidator_Attribute_NamedValidator()
        {
            TestDummy_NamedValidator dummy = new TestDummy_NamedValidator {
                MailAddress = "*****@*****.**"
            };

            EntLib.ValidationResults results = EntLib.Validation.Validate(dummy, "ValidationTest");
            Assert.IsFalse(results.IsValid);

            dummy.MailAddress = "user@[127.251.123.42]";
            results           = EntLib.Validation.Validate(dummy, "ValidationTest");
            Assert.IsTrue(results.IsValid);
        }