Esempio n. 1
0
            private FieldValidationExpression register(IFieldValidationRule rule)
            {
                _lastRule = new RuleRegistrationExpression(a => rule, _accessor);
                _parent._rules.Add(_lastRule);

                return(this);
            }
Esempio n. 2
0
        public RuleRegistrationExpression Require(params Expression <Func <T, object> >[] properties)
        {
            var accessors  = properties.Select(x => x.ToAccessor());
            var expression = new RuleRegistrationExpression(a => new RequiredFieldRule(), accessors);

            _rules.Add(expression);

            return(expression);
        }