Esempio n. 1
0
        static void Main(string[] args)
        {
            var v = new Validity();

            v["33", "The", "Last", "String", "Should", "Fail", "*****@*****.**", string.Empty]
                .Require()
                .Match(NamedPatterns.Integer)
                .Range(20, 40)
                .LessThanOrEqualTo(233)
                .GreaterThan(4)
                .MaxLength(2);

            // v[this.Request.Form["Username"], this.Request.Form["Password"]].Require();

            if (v.Valid) { }

            Console.WriteLine(v.Errors);
            Console.ReadKey();
        }
Esempio n. 2
0
 public ValidityChain(Validity _parent, params string[] _strings)
 {
     reduction = new List <string>(_strings);
     parent    = _parent;
 }