1

Closed

Localized Required attribute with proper ErrorMessageResourceName

description

I observed a possible error in MemberValidationMetadata.cs class. In AddMetadata method (with two parameters) if the errorMessage starts with res: keyword the errormessage property is updated instead of errorMessageResourceName. So long story made short you should replace the line
attribute.ErrorMessage = errorMessage.Substring(4);
to
attribute.ErrorMessageResourceName = errorMessage.Substring(4);
Could you update the code and publish to nuget?

BR.
Zsolt
Closed Nov 10, 2013 at 6:56 PM by MdeJ

comments

MdeJ wrote Nov 10, 2013 at 6:56 PM

Thanks for informing me about this issue. I've just applied your patch and pushed a new nuget package.Merijn