Exemple #1
0
        private void SetupFluentValidationConventions()
        {
            var conventions = new FluentValidationConventions(new SampleValidatorFactory());

            ModelPropertyFactory.ExampleForPropertyConvention = conventions.ExampleConvention;
            ModelPropertyFactory.LabelForPropertyConvention   = conventions.LabelConvention;
            ModelPropertyFactory.PartialNameConvention        = conventions.PartialNameConvention;
            ModelPropertyFactory.PropertyIsRequiredConvention = conventions.RequiredConvention;
        }
        private void SetupFluentValidationConventions()
        {
            var conventions = new FluentValidationConventions(new SampleValidatorFactory());

            ModelPropertyFactory.ExampleForPropertyConvention = conventions.ExampleConvention;
            ModelPropertyFactory.LabelForPropertyConvention = conventions.LabelConvention;
            ModelPropertyFactory.PartialNameConvention = conventions.PartialNameConvention;
            ModelPropertyFactory.PropertyIsRequiredConvention = conventions.RequiredConvention;
        }