How can we improve Breeze.js?

Support .NET Validation Attributes

It would be great if the .NET validation attributes defined on the business model were sent along with the metadata. One benefit of this feature would be that we wouldn't have to redefine error messages on the client side.

278 votes
Vote
Sign in
(thinking…)
Sign in with: facebook google
Signed in as (Sign out)
You have left! (?) (thinking…)
Samuel Berthelot shared this idea  ·   ·  Flag idea as inappropriate…  ·  Admin →
AdminAdmin (Product Manager, Breeze.js) responded  · 

A quick update for this request:

We’re probably 50% there today, but hope to get to 80% soon. This is certain to get done, but we’re just not there yet.

10 comments

Sign in
(thinking…)
Sign in with: facebook google
Signed in as (Sign out)
Submitting...
  • RockResolve commented  ·   ·  Flag as inappropriate

    Added my own answer refinement. Default displayName on client converting "PascalCaseFieldName" or "camelCaseFieldName" to "Upper Case Field Name".

    This means a lot less EF annotation of DisplayName (used by validation messages)

  • Wilson Lilburne commented  ·   ·  Flag as inappropriate

    It seems like just Display("Product Name") and perhaps ErrorMessage is the only major ones left to be implemented. At the moment we are just letting them be displayed in ugly camel case, eg "productName is required" until we get this functionality.

  • Jeff Michelson commented  ·   ·  Flag as inappropriate

    Hello good people at IdeaBlade. Any progress on this excellent suggestion? Thanks for your great product!

    By the way - - I've noticed that this suggestion is not "Under Review". Does that mean that it's not being considered?

  • George Durzi commented  ·   ·  Flag as inappropriate

    Hi there? I wanted to check on the progress on this feature. Thank you for all your hard work.

  • Chris Anderson commented  ·   ·  Flag as inappropriate

    In particular, getting the DisplayName attribute value (if nothing else yet) would be most valuable, as then they can be displayed to the user in validation error messages instead of property names.

  • Brahma Acharya commented  ·   ·  Flag as inappropriate

    Am I missing something here? I believe the in-built attributes like [Required], [MinLength] etc. are available out of the box. If you use Entity Manager's saveChanges method, Breeze will throw the exception the way it would do on the server side.

  • Anonymous commented  ·   ·  Flag as inappropriate

    Good idea. It is important that Breeze support .NET validation attributes, for example "DisplayName", "ErrorMessage", "ErrorMessageResourceName"... etc.

Feedback and Knowledge Base