Пример #1
0
        public virtual void AddValidator(ValidatorProperties validator)
        {
            var editComponent = EditColtrol as IRenderComponent;

            if (editComponent != null)
            {
                editComponent.AddValidator(validator);
            }
            else
            {
                ValidatorProperties.Add(validator);
                AddClientValidator(validator, ValidatorProperties.Count);
            }
        }
Пример #2
0
        public virtual void AddValidators(IEnumerable <ValidatorProperties> validators)
        {
            var editComponent = EditColtrol as IRenderComponent;

            if (editComponent != null)
            {
                editComponent.AddValidators(validators);
            }
            else
            {
                foreach (var validator in validators)
                {
                    ValidatorProperties.Add(validator);
                    AddClientValidator(validator, ValidatorProperties.Count);
                }
            }
        }