IntertechInc / aa-validation-from-server

Angular Agility form validation that is retrieved from Web API and DTO classes
Other
12 stars 4 forks source link

Integration of my features #11

Open wald-tq opened 9 years ago

wald-tq commented 9 years ago

Hi Rich,

Do you want to incorporate my features in my branch? Some additional work is needed in:

The Features I implemented:

I am afraid I can't spit each feature off and provide independent pull-requests because of the lack in time.

Right now I am now building my own nuget package and use it in my project.

Regards, Thomas

wald-tq commented 9 years ago

My latest feature, the configuration of the error messages came also a bigger refactoring which simplifies the function signatures a lot.

The ResourceNamespace and ResourceAssemblyName doesn't need to get passed around anymore.

You can now add the error Message formatter like this in the Controller:

            ValidationHelper._errorMessageFormatter = new List<IErrorMessageFormatter> {
                new AttributeErrorMessageFormatter(),
                new ResourceErrorMessageFormatter{ResourceNamespace = "Namespace", ResourceAssemblyName = "Assembly"},
                new DefaultErrorMessageFormatter(),
            };
            var valHelper = new ValidationHelper();
            object jsonObject = valHelper.GetValidations(dtoObjectName, "AATestAPI.Models", "AATestAPI");
richinator38 commented 9 years ago

Sorry, I've been studying for certification exams. Done now and hope to look at this soon. I'd like to implement your stuff, I just need a chunk of time. Thanks for your work!

wald-tq commented 9 years ago

No problem, thanks for your reply!