0
votes

I've noticed that if I do the following in my C# model:

[Required(ErrorMessage="Le numéro de police est requis.")]
public string PolicyNumber { get; set; }

the error message is not passed along with the metadata. That's annoying because it means I have to redefine all of my custom messages on the client side. Is there anyway to pass this information with the metadata ?

2

2 Answers

0
votes

Breeze does not yet convert .NET Validation attributes to Breeze validations. But it is a very reasonable request. Please add this to the Breeze User Voice. We take this venue very seriously in determining what to work on next... and thx for the suggestion.

0
votes

I am working on this for my project. What I have done is downloaded the source code for EFContextProvider. Then change the code in BuildJsonMetadata() so that it uses reflection to produce the metadata string using JSON.NET objects.