- Notifications
You must be signed in to change notification settings - Fork 156
Closed
Labels
forms: validationForms validation related, including ngModel.status aka VALID/INVALID/TOUCHED/PRISTINE etc.Forms validation related, including ngModel.status aka VALID/INVALID/TOUCHED/PRISTINE etc.inputinput-groupstatus: not-a-bug
Description
Description
Validation messages are nor displayed until focus is moved outside the validated input when defined like that:
<igx-input-group type="border"> <input type="text" igxInput formControlName="shipName" /> <label igxLabel>shipName</label> @if (orderDtoFormModel.controls.shipName.touched && orderDtoFormModel.controls.shipName.hasError("minlength")) { <igx-hint>Entry should be at least 3 character(s) long</igx-hint> } @if (orderDtoFormModel.controls.shipName.touched && orderDtoFormModel.controls.shipName.hasError("maxlength")) { <igx-hint>Entry should be no more than 8 character(s) long</igx-hint> } @if (orderDtoFormModel.controls.shipName.touched && orderDtoFormModel.controls.shipName.hasError("pattern")) { <igx-hint>Entry does not match the required pattern</igx-hint> } </igx-input-group> - igniteui-angular version: 19.1.6
- browser: N/A
Steps to reproduce
- Run the attached sample
- focus
shipNamefield and typeas
Result
The input's border is changed to red as if the input is failing validation but no validation message is displayed.
Expected result
The validation message is dispalyed
Note:
Validation messages are displayed when changing focus - clicking another field or opening the dev tools. Probably, a change detection related issue.
This may be relted to issue #15646
Attachments
Metadata
Metadata
Assignees
Labels
forms: validationForms validation related, including ngModel.status aka VALID/INVALID/TOUCHED/PRISTINE etc.Forms validation related, including ngModel.status aka VALID/INVALID/TOUCHED/PRISTINE etc.inputinput-groupstatus: not-a-bug