You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using RxFormBuilder with entities decorated with async() the following warning is issued at runtime multiple times:
It looks like you're constructing using a FormControl with both an options argument and an
async validators argument. Mixing these arguments will cause your async validators to be dropped.
You should either put all your validators in the options object, or in separate validators
arguments. For example:
// Using validators arguments
fc = new FormControl(42, Validators.required, myAsyncValidator);
// Using AbstractControlOptions
fc = new FormControl(42, {validators: Validators.required, asyncValidators: myAV});
// Do NOT mix them: async validators will be dropped!
fc = new FormControl(42, {validators: Validators.required}, /* Oops! */ myAsyncValidator);
Expected Behavior
No warnings shown at runtime
To Reproduce
Create a FormGroup using an entity with synchronous and async validators.
Url (stackblitz or plunker or other)
Package Version
@rxweb/reactive-form-validators@13.0.0
The text was updated successfully, but these errors were encountered:
Describe the bug
When using RxFormBuilder with entities decorated with async() the following warning is issued at runtime multiple times:
It looks like you're constructing using a FormControl with both an options argument and an
async validators argument. Mixing these arguments will cause your async validators to be dropped.
You should either put all your validators in the options object, or in separate validators
arguments. For example:
// Using validators arguments
fc = new FormControl(42, Validators.required, myAsyncValidator);
// Using AbstractControlOptions
fc = new FormControl(42, {validators: Validators.required, asyncValidators: myAV});
// Do NOT mix them: async validators will be dropped!
fc = new FormControl(42, {validators: Validators.required}, /* Oops! */ myAsyncValidator);
Expected Behavior
No warnings shown at runtime
To Reproduce
Create a FormGroup using an entity with synchronous and async validators.
Url (stackblitz or plunker or other)
Package Version
@rxweb/reactive-form-validators@13.0.0
The text was updated successfully, but these errors were encountered: