ngx-intl-tel-input
ngx-intl-tel-input copied to clipboard
Feature-Req: dynamic error/success classes
Is there a way to add custom classes based on validation?
On other standard inputs, I'd have something like
[ngClass]="{'is-valid': isValid('phone'), 'is-invalid':hasError('phone')}"
to faciliate bootstrap's is-valid/is-invalid classes. This does apparently not work on ngx-intl-tel-input
Not sure if we're going to remove ngx-bootstrap as a dependency or not in the future to make it less dependant on other libraries.
But meanwhile we can leave this for a vote ;)
Here's a workaround:
[cssClass]="input.checkValidity() ? 'form-control is-valid' : 'form-control is-invalid'"