예제 #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
     });
 }
예제 #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));
        }
예제 #3
0
 public static void MaxValue(this IAccessorRulesExpression expression, IComparable bounds, StringToken message, ValidationMode mode)
 {
     expression.Add(new MaxValueFieldRule(bounds, message)
     {
         Mode = mode
     });
 }
예제 #4
0
 public static void GreaterOrEqualToZero(this IAccessorRulesExpression expression, StringToken message, ValidationMode mode)
 {
     expression.Add(new GreaterOrEqualToZeroRule(message)
     {
         Mode = mode
     });
 }
예제 #5
0
 public static void MinValue(this IAccessorRulesExpression expression, IComparable bounds, ValidationMode mode)
 {
     expression.Add(new MinValueFieldRule(bounds)
     {
         Mode = mode
     });
 }
예제 #6
0
 public static void MinimumLength(this IAccessorRulesExpression expression, int length, ValidationMode mode)
 {
     expression.Add(new MinimumLengthRule(length)
     {
         Mode = mode
     });
 }
예제 #7
0
 public static void Email(this IAccessorRulesExpression expression, StringToken message, ValidationMode mode)
 {
     expression.Add(new EmailFieldRule(message)
     {
         Mode = mode
     });
 }
예제 #8
0
 public static void MaximumLength(this IAccessorRulesExpression expression, int length, StringToken message, ValidationMode mode)
 {
     expression.Add(new MaximumLengthRule(length, message)
     {
         Mode = mode
     });
 }
예제 #9
0
 public static void TriggeredValidation(this IAccessorRulesExpression expression)
 {
     expression.ValidationMode(Validation.ValidationMode.Triggered);
 }
예제 #10
0
 public static void LiveValidation(this IAccessorRulesExpression expression)
 {
     expression.ValidationMode(Validation.ValidationMode.Live);
 }
예제 #11
0
 public static void ValidationMode(this IAccessorRulesExpression expression, ValidationMode mode)
 {
     expression.Add(mode);
 }
예제 #12
0
 public static void Email(this IAccessorRulesExpression expression, ValidationMode mode)
 {
     expression.Add(new EmailFieldRule {
         Mode = mode
     });
 }
예제 #13
0
 public static void GreaterOrEqualToZero(this IAccessorRulesExpression expression, StringToken message)
 {
     expression.Add(new GreaterOrEqualToZeroRule(message));
 }
예제 #14
0
 public static void MinValue(this IAccessorRulesExpression expression, IComparable bounds, StringToken message)
 {
     expression.Add(new MinValueFieldRule(bounds, message));
 }
예제 #15
0
 public static void MaximumLength(this IAccessorRulesExpression expression, int length, StringToken message)
 {
     expression.Add(new MaximumLengthRule(length, message));
 }
예제 #16
0
 public static void MinimumLength(this IAccessorRulesExpression expression, int length)
 {
     expression.Add(new MinimumLengthRule(length));
 }
예제 #17
0
 public static void RangeLength(this IAccessorRulesExpression expression, int min, int max)
 {
     expression.Add(new RangeLengthFieldRule(min, max));
 }
예제 #18
0
 public static void GreaterOrEqualToZero(this IAccessorRulesExpression expression)
 {
     expression.Add(new GreaterOrEqualToZeroRule());
 }
예제 #19
0
 public static void Required(this IAccessorRulesExpression expression, StringToken message)
 {
     expression.Add(new RequiredFieldRule(message));
 }
예제 #20
0
 public static void GreaterOrEqualToZero(this IAccessorRulesExpression expression, ValidationMode mode)
 {
     expression.Add(new GreaterOrEqualToZeroRule {
         Mode = mode
     });
 }
예제 #21
0
 public static void Email(this IAccessorRulesExpression expression)
 {
     expression.Add(new EmailFieldRule());
 }
예제 #22
0
 public static void Required(this IAccessorRulesExpression expression)
 {
     expression.Add(new RequiredFieldRule());
 }
예제 #23
0
 public static void Email(this IAccessorRulesExpression expression, StringToken message)
 {
     expression.Add(new EmailFieldRule(message));
 }
예제 #24
0
 public static void Required(this IAccessorRulesExpression expression, ValidationMode mode)
 {
     expression.Add(new RequiredFieldRule {
         Mode = mode
     });
 }
예제 #25
0
 public static void MaxValue(this IAccessorRulesExpression expression, IComparable bounds)
 {
     expression.Add(new MaxValueFieldRule(bounds));
 }