Open xlynx555 opened 4 years ago
Do you have any entity-level errors? This sounds a lot like #119
Damn, I have same misleading understanding as in #119 Sorry, I should better look for closed issues before posting this...
No problem! That's probably a sign that I should update the docs. Leaving this open as a reminder
Hi @canton7 I had the same misunderstanding as @xlynx555, is there a way to get errors as a list of strings from ValidatingModelBase
?
Currently I do this:
var errors = await Validator.ValidateAllPropertiesAsync();
No. I'd accept a PR which added this.
Hi, Method ValidatingModelBase.GetErrors(string propertyName) supposed to return entity-level errors if propertyName is null or string.empty (as it said in description):
<param name="propertyName">The name of the property to retrieve validation errors for; or null or System.String.Empty, to retrieve entity-level errors.</param>
However, it's always returns null if no propertyName is set.