-
-
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
Error when trying to merge validators #87
Comments
Please reproduce it on stackblitz. |
@NetanelBasal Sure, but do you have a functioning template I can use? If I try to set up stackblitz I get |
@NetanelBasal Any news on this? |
@tafax can you try v1.7.3? |
@NetanelBasal Unfortunately, It is still there for me. |
Can you reproduce on stackblitz, please? |
@NetanelBasal I still get |
Having the same issue. Somehow, always a const control = new FormControl<string>("", []) I am on |
Can you reproduce on stackblitz, please? |
@NetanelBasal sure but StackBlitz says "cannot compile reactive-forms"... I will try ng-repl |
@NetanelBasal sorry to ping again, I got a working repl here: https://codesandbox.io/s/reactive-forms-issue-87-ehccj?file=/src/app/app.component.ts (OT: why is StackBlitz so hyped, Codesandbox works way better IMO and has great VS Code features) |
I can check it, but this method is redundant. In v12 they added the |
Fixed and deprecated. |
I'm submitting a...
Current behavior
When invoking
mergeValidators
an error is thrown.Expected behavior
The validators are correctly merged without errors.
Minimal reproduction of the problem with instructions
Given a form group created with the typed
FormBuilder
:when validators are merged
then this error is thrown
Minimal troubleshooting
It seems related to the fact that the
group
has a null validator. The code that applies a merge doesn't skip it and the following one will use an array like[null, ...]
. Therefore, a deeper investigation is needed 😄What is the motivation / use case for changing the behavior?
Environment
The text was updated successfully, but these errors were encountered: