Exemplo n.º 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;
        }
Exemplo n.º 2
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;
        }