FubuMvcArchive / fubuvalidation

FubuValidation -- have validation your way, whatever way that happens to be

Home Page:http://validation.fubu-project.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Registering IFieldValidationSource via Validation DSL require a default ctor

KevM opened this issue · comments

I've already discussed this with Josh and Jeremy. Jeremy asked me to create an issue.

I have a FieldValidationSource which has dependencies I wish to pull in via a Container. Here is my current validation registration:

var validationRegistry = new ValidationRegistry(x =>
{
    x.FieldSource<AttributeFieldValidationSource>();
    x.FieldSource<ModelMapSchemaFieldValidationSource>();
});
this.Validation(validationRegistry, v =>
                                        {
                                           //blah blah blah
                                        }); 

The source of this trouble is ValidationRegistry which news up each given IFieldValidationSource.

It seems that because the validation DSL is happening at FubuRegistration time container concerns are tricky to include.

This is going to be tricky...and will more than likely break stuff for anyone using FubuMVC.Validation. I'm going to come back to this one.

This has been done for a while, just never closed this out.