You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When executing JsonPatchDocument.ApplyTo(obj) the property name doesn't get passed into the error message.
e.g. passing "" to a required property returns "The value '' is invalid for target location." rather then "The value '' is invalid for target {property name}."
Looking at the surrounding code and making some pretty big assumptions i believe this could be resolved by changing: errorMessage = Resources.FormatInvalidValueForProperty(value);
To errorMessage = Resources.FormatInvalidValueForProperty(value, segment);
Certainly for my use case this would be an awesome change, and I imagine this would be very helpful to others as well :).
The text was updated successfully, but these errors were encountered:
When executing JsonPatchDocument.ApplyTo(obj) the property name doesn't get passed into the error message.
e.g. passing "" to a required property returns "The value '' is invalid for target location." rather then "The value '' is invalid for target {property name}."
Looking at the surrounding code and making some pretty big assumptions i believe this could be resolved by changing:
errorMessage = Resources.FormatInvalidValueForProperty(value);
To
errorMessage = Resources.FormatInvalidValueForProperty(value, segment);
Certainly for my use case this would be an awesome change, and I imagine this would be very helpful to others as well :).
The text was updated successfully, but these errors were encountered: