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
{{ message }}
Repository navigation
ValidationAttribute.SetResourceAccessorByPropertyLookup should throw better exception #44292
Converting TODO-NULLABLE into the issue here since I'm not familiar with the area I'll leave it for area owner to decide if they want to close it or leave it. I'll remove the original comment in case it's decided this should be closed.
In ValidationAttribute.SetResourceAccessorByPropertyLookup (last line):
This basically means that if the user sets up the validation attribute to point at a resource accessor, and the property returns null, attempts to format an error message will fail with ArgumentNullException. This is incorrect/unsupported usage by the user, so barring changing the exception to be slightly more informative I don't think there's anything to do.
Activity
ajcvickers commentedon Jul 13, 2021
@roji Can you take a quick look at this along with the other nullable cleanup?
roji commentedon Jul 14, 2021
This basically means that if the user sets up the validation attribute to point at a resource accessor, and the property returns null, attempts to format an error message will fail with ArgumentNullException. This is incorrect/unsupported usage by the user, so barring changing the exception to be slightly more informative I don't think there's anything to do.