ngx-sub-form
ngx-sub-form copied to clipboard
Enforce `Validators.required` on required fields
This issue would solve a subset of #147.
It's possible to find in an object type:
- all the optional keys
- all the keys where the values can be either null or undefined
So basically, we're able to ask the consumer to write down all the required and non nil keys.
We could then dynamically onto the form group add Validators.required
on all of those (+ add a global check on the form to make sure that if some values are disabled, they're still required at the form level).
Hi @maxime1992 ! I would like to work on this feature if no one else is working on it.
@noobyogi0010 wow sorry for the delay here, I completely forgot about this thread, just found it randomly :exploding_head:.
We recently merged the rewrite so that's a good timing.
If you're still up for it, defining and agreeing on the API would be the first step :)
@zakhenry do you reckon that's a good idea or can you think of anything against that?