How can we improve Breeze.js?

Change the Required Validator to check the context property to allowemptystring

Change the Required value Validator such that it can read the property to allow empty strings.

Change line:

if (ctx && ctx.allowEmptyStrings) return true;

For:

if (ctx && (ctx.allowEmptyStrings || ctx.property && ctx.property.allowEmptyStrings)) return true;

8 votes
Vote
Sign in
(thinking…)
Sign in with: facebook google
Signed in as (Sign out)
You have left! (?) (thinking…)
Francois Germain shared this idea  ·   ·  Flag idea as inappropriate…  ·  Admin →

1 comment

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

    Assuming you're using EF, it would also be helpful for the server to set this automatically if the property has a [Required(AllowEmptyStrings = true)] attribute.

Feedback and Knowledge Base