Ejemplo n.º 1
0
 public static void RangeLength(this IAccessorRulesExpression expression, int min, int max, StringToken message, ValidationMode mode)
 {
     expression.Add(new RangeLengthFieldRule(min, max, message)
     {
         Mode = mode
     });
 }
Ejemplo n.º 2
0
        public static IAccessorRulesExpression InputBuilder <T>(
            this IAccessorRulesExpression expression, string profile = null) where T : IElementBuilder, new()
        {
            var @override = new ElementTagOverride <T>(ElementConstants.Editor, profile);

            return(expression.Add(@override));
        }
Ejemplo n.º 3
0
 public static void MaximumLength(this IAccessorRulesExpression expression, int length, StringToken message, ValidationMode mode)
 {
     expression.Add(new MaximumLengthRule(length, message)
     {
         Mode = mode
     });
 }
Ejemplo n.º 4
0
 public static void MaxValue(this IAccessorRulesExpression expression, IComparable bounds, StringToken message, ValidationMode mode)
 {
     expression.Add(new MaxValueFieldRule(bounds, message)
     {
         Mode = mode
     });
 }
Ejemplo n.º 5
0
 public static void MinValue(this IAccessorRulesExpression expression, IComparable bounds, ValidationMode mode)
 {
     expression.Add(new MinValueFieldRule(bounds)
     {
         Mode = mode
     });
 }
Ejemplo n.º 6
0
 public static void GreaterOrEqualToZero(this IAccessorRulesExpression expression, StringToken message, ValidationMode mode)
 {
     expression.Add(new GreaterOrEqualToZeroRule(message)
     {
         Mode = mode
     });
 }
Ejemplo n.º 7
0
 public static void MinimumLength(this IAccessorRulesExpression expression, int length, ValidationMode mode)
 {
     expression.Add(new MinimumLengthRule(length)
     {
         Mode = mode
     });
 }
Ejemplo n.º 8
0
 public static void Email(this IAccessorRulesExpression expression, StringToken message, ValidationMode mode)
 {
     expression.Add(new EmailFieldRule(message)
     {
         Mode = mode
     });
 }
Ejemplo n.º 9
0
 public static void GreaterOrEqualToZero(this IAccessorRulesExpression expression)
 {
     expression.Add(new GreaterOrEqualToZeroRule());
 }
Ejemplo n.º 10
0
 public static void ValidationMode(this IAccessorRulesExpression expression, ValidationMode mode)
 {
     expression.Add(mode);
 }
Ejemplo n.º 11
0
 public static void Email(this IAccessorRulesExpression expression, ValidationMode mode)
 {
     expression.Add(new EmailFieldRule {
         Mode = mode
     });
 }
Ejemplo n.º 12
0
 public static void Required(this IAccessorRulesExpression expression, StringToken message)
 {
     expression.Add(new RequiredFieldRule(message));
 }
Ejemplo n.º 13
0
 public static void MinValue(this IAccessorRulesExpression expression, IComparable bounds, StringToken message)
 {
     expression.Add(new MinValueFieldRule(bounds, message));
 }
Ejemplo n.º 14
0
 public static void MaximumLength(this IAccessorRulesExpression expression, int length, StringToken message)
 {
     expression.Add(new MaximumLengthRule(length, message));
 }
Ejemplo n.º 15
0
 public static void MinimumLength(this IAccessorRulesExpression expression, int length)
 {
     expression.Add(new MinimumLengthRule(length));
 }
Ejemplo n.º 16
0
 public static void GreaterOrEqualToZero(this IAccessorRulesExpression expression, StringToken message)
 {
     expression.Add(new GreaterOrEqualToZeroRule(message));
 }
Ejemplo n.º 17
0
 public static void RangeLength(this IAccessorRulesExpression expression, int min, int max)
 {
     expression.Add(new RangeLengthFieldRule(min, max));
 }
Ejemplo n.º 18
0
 public static void GreaterOrEqualToZero(this IAccessorRulesExpression expression, ValidationMode mode)
 {
     expression.Add(new GreaterOrEqualToZeroRule {
         Mode = mode
     });
 }
Ejemplo n.º 19
0
 public static void Email(this IAccessorRulesExpression expression)
 {
     expression.Add(new EmailFieldRule());
 }
Ejemplo n.º 20
0
 public static void Required(this IAccessorRulesExpression expression)
 {
     expression.Add(new RequiredFieldRule());
 }
Ejemplo n.º 21
0
 public static void MaxValue(this IAccessorRulesExpression expression, IComparable bounds)
 {
     expression.Add(new MaxValueFieldRule(bounds));
 }
Ejemplo n.º 22
0
 public static void Required(this IAccessorRulesExpression expression, ValidationMode mode)
 {
     expression.Add(new RequiredFieldRule {
         Mode = mode
     });
 }
Ejemplo n.º 23
0
 public static void Email(this IAccessorRulesExpression expression, StringToken message)
 {
     expression.Add(new EmailFieldRule(message));
 }