JeremySkinner/FluentValidation — pull request #45 by milanc (2014-10-31 16:13:57+00:00)
Title: Added properties to Error that can be used to build customized message.

Hi

Added ErrorCode property so certain actions can be taken inside business logic based on error code.
ErrorCode for built in validations are based on resource keys for messages e.g. "exact_length_error"
When WithLocalizedMessage is used then error code would be that resource message key.
Also some of private objects are exposed as properties that can help to build custom error message.

![image](https://cloud.githubusercontent.com/assets/8333458/4863907/388b8f7a-6118-11e4-9c09-12a086f19127.png)

We are using validation in API, returned JSON can be used by consumer to create custom maybe shorter, or more descriptive message for its end users.
This is current response based on our custom class (we have customized property names to be same as existing error object we had)

![image](https://cloud.githubusercontent.com/assets/8333458/4863925/4caaee4c-6118-11e4-8368-0dc136d61553.png)

Hope this make sense.
Thanks
Milan