Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enforce Validators.required on required fields #172

Open
maxime1992 opened this issue May 7, 2020 · 2 comments
Open

Enforce Validators.required on required fields #172

maxime1992 opened this issue May 7, 2020 · 2 comments
Assignees
Labels
type: feature This is a new feature

Comments

@maxime1992
Copy link
Contributor

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).

@maxime1992 maxime1992 added the type: feature This is a new feature label May 7, 2020
@maxime1992 maxime1992 changed the title Enfore Validators.required on required fields Enforce Validators.required on required fields May 23, 2020
@noobyogi0010
Copy link

Hi @maxime1992 !
I would like to work on this feature if no one else is working on it.

@maxime1992
Copy link
Contributor Author

@noobyogi0010 wow sorry for the delay here, I completely forgot about this thread, just found it randomly 🤯.

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: feature This is a new feature
Projects
None yet
Development

No branches or pull requests

2 participants