deepkeys and partial reuse
I'm looking into spreading error messages using of a big tformdata into targeted places. for this, i planned to use a form with nested objects:
and in my FooBarComponent, something like:
but when i do, it creates a weird form state where
while i do understand why it's like this, i definitely do not feel it's a good UX ; is there any way for me not to have to pull the error by path, obviously without having to pass again the validator?
and in my FooBarComponent, something like:
but when i do, it creates a weird form state where
foo, foo.bar and foo.baz are 3 distinct fields and the 3 fields do not share a common state... since the validator is at the foo level, the foo.bar and foo.baz do not get errors spread even tho we can see the foo state to have meta.errors.path to contain ["bar"]while i do understand why it's like this, i definitely do not feel it's a good UX ; is there any way for me not to have to pull the error by path, obviously without having to pass again the validator?