Hats off. It is a great framework. I used it lot of time in my project. For my new project i have to pass error code and and customize all the error message.
For example i have to generate error code 1201 for NotEmpty validation with our own validation message.
I am wondering is there are a way i can pass the resource file to the framework. So the framework picks up my message instead of default message.
For example instead of
'{PropertyName}' must not be empty.
i will add
Error Code 1201. {Property} must be populated.
I really don't want to add WithMessage all the time.
Comments: Looks like you can do it with this: https://fluentvalidation.codeplex.com/wikipage?title=Localization&referringTitle=Documentation
For example i have to generate error code 1201 for NotEmpty validation with our own validation message.
I am wondering is there are a way i can pass the resource file to the framework. So the framework picks up my message instead of default message.
For example instead of
'{PropertyName}' must not be empty.
i will add
Error Code 1201. {Property} must be populated.
I really don't want to add WithMessage all the time.
Comments: Looks like you can do it with this: https://fluentvalidation.codeplex.com/wikipage?title=Localization&referringTitle=Documentation