-
-
Notifications
You must be signed in to change notification settings - Fork 56
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
The validators are not triggered on value change and init #86
Comments
Does the issue happen in any version above v9? |
@NetanelBasal v9 was fine, v10 is failing, v11 (Stackblitz) is also failing :/ |
Can you tell what am I missing: https://codesandbox.io/s/aged-leftpad-7uxbo?file=/src/app/app.component.ts |
@NetanelBasal I forked your sandbox and I was not able to reproduce the issue even after changing as much stuff as possible to reproduce the same environment than the Stackblitz reproduction one... |
Unfortunately not. We're simply extending the Angular Try to debug the code. |
I ran the Stackblitz reproduction locally and there is no issue (so Stackblitz bye bye, lier). |
Context
In one of my project, I performed the migration from Angular 9 to 10.
I saw some failing tests related to the forms validation.
I figured that using this project was the root cause.
Using Angular imports instead (for the
FormGroup
andFormControl
) fixed my issue.I'm submitting a...
Current behavior
The validators are not working (native and custom).
Expected behavior
An empty string value in a control with a required validator or a custom one (actually in this reproduction it was a validator that check if the value is
null
,undefined
or''
) should be considered as an error.Minimal reproduction of the problem with instructions
In this reproduction, there is two identical forms that should invalidate the form right from the initialisation.
One is based on classes from Angular and the second from ngneat.
Angular is working as expected.
Ngneat is telling me that my form is valid.
I can see that the custom validator log is not trigger when the value change in the ngneat form.
https://ngneat-testing-issue.stackblitz.io/
What is the motivation / use case for changing the behavior?
It should work like Angular.
Environment
The text was updated successfully, but these errors were encountered: