Inheritance: System.Web.UI.WebControls.BaseValidator
        private void SetUpDynamicValidator(DynamicValidator validator, MetaColumn column)
        {
            validator.Column = column;

            // Tell the DynamicValidator which validation attributes it should ignore (because
            // they're already handled by server side ASP.NET validator controls)
            validator.SetIgnoredModelValidationAttributes(_ignoredModelValidationAttributes);
        }
        // This method create's validators for a particular column type. This should be as close to the the actual FieldTemplates (user controls) as possible.
        // DateTime -> Required, Regex
        // Integer -> Regex, Required, Range, Compare
        // Decimal -> Regex, Required, Range, Compare
        // Text -> Regex, Required
        // Enum -> Required
        private void CreateValidators(MetaColumn column) {
            if (_validators == null) {
                _validators = new List<BaseValidator>();
            }

            // Exclude regular expression validator for enum columns
            if (column.GetEnumType() == null) {
                RegularExpressionValidator regularExpressionValidator = new RegularExpressionValidator {
                    ControlToValidate = TextBoxID,
                    Enabled = false,
                    Display = ValidatorDisplay.Static,
                    CssClass = "DDControl DDValidator"
                };
                _validators.Add(regularExpressionValidator);
            }

            if (column.IsInteger || column.ColumnType == typeof(decimal) || column.ColumnType == typeof(double) || column.ColumnType == typeof(float)) {
                RangeValidator rangeValidator = new RangeValidator {
                    ControlToValidate = TextBoxID,
                    Enabled = false,
                    Display = ValidatorDisplay.Static,
                    MinimumValue = "0",
                    MaximumValue = "100",
                    CssClass = "DDControl DDValidator",
                    Type = column.IsInteger ? ValidationDataType.Integer : ValidationDataType.Double                    
                };
                _validators.Add(rangeValidator);

                CompareValidator compareValidator = new CompareValidator {
                    ControlToValidate = TextBoxID,
                    Enabled = false,
                    Display = ValidatorDisplay.Static,
                    Operator = ValidationCompareOperator.DataTypeCheck,
                    CssClass = "DDControl DDValidator",
                    Type = column.IsInteger ? ValidationDataType.Integer : ValidationDataType.Double
                };
                _validators.Add(compareValidator);
            }

            RequiredFieldValidator requiredFieldValidator = new RequiredFieldValidator {
                ControlToValidate = TextBoxID,
                Enabled = false,
                CssClass = "DDControl DDValidator",
                Display = ValidatorDisplay.Static
            };
            _validators.Add(requiredFieldValidator);


            DynamicValidator dynamicValidator = new DynamicValidator {
                ControlToValidate = TextBoxID,
                CssClass = "DDControl DDValidator",
                Display = ValidatorDisplay.Static
            };
            _validators.Add(dynamicValidator);
        }
        // This method create's validators for a particular column type. This should be as close to the the actual FieldTemplates (user controls) as possible.
        // DateTime -> Required, Regex
        // Integer -> Regex, Required, Range, Compare
        // Decimal -> Regex, Required, Range, Compare
        // Text -> Regex, Required
        // Enum -> Required
        private void CreateValidators(MetaColumn column)
        {
            if (_validators == null)
            {
                _validators = new List <BaseValidator>();
            }

            // Exclude regular expression validator for enum columns
            if (column.GetEnumType() == null)
            {
                RegularExpressionValidator regularExpressionValidator = new RegularExpressionValidator {
                    ControlToValidate = TextBoxID,
                    Enabled           = false,
                    Display           = ValidatorDisplay.Static,
                    CssClass          = "DDControl DDValidator"
                };
                _validators.Add(regularExpressionValidator);
            }

            if (column.IsInteger || column.ColumnType == typeof(decimal) || column.ColumnType == typeof(double) || column.ColumnType == typeof(float))
            {
                RangeValidator rangeValidator = new RangeValidator {
                    ControlToValidate = TextBoxID,
                    Enabled           = false,
                    Display           = ValidatorDisplay.Static,
                    MinimumValue      = "0",
                    MaximumValue      = "100",
                    CssClass          = "DDControl DDValidator",
                    Type = column.IsInteger ? ValidationDataType.Integer : ValidationDataType.Double
                };
                _validators.Add(rangeValidator);

                CompareValidator compareValidator = new CompareValidator {
                    ControlToValidate = TextBoxID,
                    Enabled           = false,
                    Display           = ValidatorDisplay.Static,
                    Operator          = ValidationCompareOperator.DataTypeCheck,
                    CssClass          = "DDControl DDValidator",
                    Type = column.IsInteger ? ValidationDataType.Integer : ValidationDataType.Double
                };
                _validators.Add(compareValidator);
            }

            RequiredFieldValidator requiredFieldValidator = new RequiredFieldValidator {
                ControlToValidate = TextBoxID,
                Enabled           = false,
                CssClass          = "DDControl DDValidator",
                Display           = ValidatorDisplay.Static
            };

            _validators.Add(requiredFieldValidator);


            DynamicValidator dynamicValidator = new DynamicValidator {
                ControlToValidate = TextBoxID,
                CssClass          = "DDControl DDValidator",
                Display           = ValidatorDisplay.Static
            };

            _validators.Add(dynamicValidator);
        }
        private void SetUpDynamicValidator(DynamicValidator validator, MetaColumn column) {
            validator.Column = column;

            // Tell the DynamicValidator which validation attributes it should ignore (because
            // they're already handled by server side ASP.NET validator controls)
            validator.SetIgnoredModelValidationAttributes(_ignoredModelValidationAttributes);
        }