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

Validators #25

Open
timdeschryver opened this issue Nov 3, 2023 · 0 comments
Open

Validators #25

timdeschryver opened this issue Nov 3, 2023 · 0 comments

Comments

@timdeschryver
Copy link
Owner

Currently validators are not re-invoked when a formfield becomes disabled/hidden.
This results in invalid form states that can't be corrected, or errors become invisible when a field is hidden.

Just like the Angular Forms API, the validators should be retriggered and become valid when that's the case.
To be able to still support disabled controls with validators, I propose a new "readOnly" property that has the same behavior as the current implementation of disabled.

This results in:

  • disabled: retriggers validation, which is always valid because validators are ignored
  • hidden: retriggers validation, which is always valid because validators are ignored
  • readOnly: retriggers validation, validates the field with the current validators
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant