コード例 #1
0
        protected virtual void InitializeValidation()
        {
            validationEngine = new ValidatorEngine();
            var configuration = new FluentConfiguration();

            foreach (var prov in MappingProviders)
            {
                configuration.Register(prov.FluentMappings.ValidationDefinitions());
            } 
            configuration.SetDefaultValidatorMode(ValidatorMode.UseAttribute);

            validationEngine.Configure(configuration);
            currentConfiguration.Initialize(validationEngine);
        }