Hi,
We are using IgxInputGroup Component. The component is not validated unless the field is focused.
How we can validate(mark fields red) a IgxInput / IgxInputGroup before they are focused on some button click event?
Hi Shahab,Thank you for reaching out!You can validate an input on another event (i.e. a button click) by:1. Get a reference to the input element w/ the IgxInputDirective
@ViewChild(IgxInputDirective, { read: IgxInputDirective, static: true }) public igxInput: IgxInputDirective;
const valid = this.igxInput.nativeElement.checkValidity();
this.igxInput.valid = valid ? IgxInputState.VALID : IgxInputState.INVALID;