ngx-intl-tel-input icon indicating copy to clipboard operation
ngx-intl-tel-input copied to clipboard

Feature-Req: dynamic error/success classes

Open pAnd0rASBG opened this issue 5 years ago • 2 comments

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

pAnd0rASBG avatar Apr 04 '19 10:04 pAnd0rASBG

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 ;)

pasevin avatar Apr 19 '19 18:04 pasevin

Here's a workaround: [cssClass]="input.checkValidity() ? 'form-control is-valid' : 'form-control is-invalid'"

jorool avatar Apr 26 '22 21:04 jorool