dotnet icon indicating copy to clipboard operation
dotnet copied to clipboard

Nested validation?

Open plettb opened this issue 1 year ago • 0 comments

Overview

The problem is explained quite clearly in #557. I believe there should be some kind of capability built into the toolkit to allow or facilitate one ObservableValidator to host another one, and when the parent "ValidateAllProperties()" is called, the call is passed through to the children. Whereas I can think of a few ways to implement this, I would bow to the wisdom of those closer to the project.

I haven't given tons of detail below, but I'd like to think it would be obvious. If not, I'll gladly provide more detailed information.

API breakdown

I don't think there are necessarily any API changed required.

Usage example

My preference would be that ValidateAllProperties() automatically (i.e. by default) also called the same method on child properties that implement "ObservableValidator".

Breaking change?

No

Alternatives

Whereas there is one possible work-around suggested in #557, it's not particularly elegant, and likely not the one I'd choose.

Additional context

No response

Help us help you

No, just wanted to propose this

plettb avatar Sep 04 '24 00:09 plettb