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
{{ message }}
This repository has been archived by the owner on Jan 5, 2022. It is now read-only.
When using [formControl] instead of formControlName, styles are not changed on validation failure.
Example: <input class="form-control" type="text" [formControl]="this.emailControl">
does not change the input class on validation failure.
For context, I'm using FormGroupTyped, so my situation is more like this: <input class="form-control" type="text" [formControl]="this.formGroup.controls.email">
The text was updated successfully, but these errors were encountered:
In my case, when using [formControl] the compilation fails altogether, as the type of the [formControl] input binding of the FormControlDirective from ng-bootstrap-form-validation is defined as string - which does ALSO match the conflicting definition in angular's own FormControlDirective, where the type is FormControl - and not string.
ng build thus yields something like this: Type 'FormControl' is not assignable to type 'string'
As far as I can tell, the @Input() formControl: string is in reality not even used in the FormControlDirective 🤔
Could it maybe just be removed??
I reckon the validation wouldn't work for such a "standalone" field, as the selector wouldn't match without that input - but now it actually breaks otherwise working, which is much worse.
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
When using
[formControl]
instead offormControlName
, styles are not changed on validation failure.Example:
<input class="form-control" type="text" [formControl]="this.emailControl">
does not change the input class on validation failure.
For context, I'm using FormGroupTyped, so my situation is more like this:
<input class="form-control" type="text" [formControl]="this.formGroup.controls.email">
The text was updated successfully, but these errors were encountered: