Skip to content

Commit ef903c3

Browse files
committed
chore(*): adding logic to get external validate required
1 parent dca922d commit ef903c3

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

projects/igniteui-angular/src/lib/directives/input/input.directive.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,8 @@ export class IgxInputDirective implements AfterViewInit, OnDestroy {
217217
if (this.ngControl && (this.ngControl.control.validator || this.ngControl.control.asyncValidator)) {
218218
validation = this.ngControl.control.validator({} as AbstractControl);
219219
}
220-
return validation && validation.required || !!this._defaultRequired;
220+
return validation && validation.required || (this._externalValidate ?
221+
this.inputGroup.isRequired : !!this._defaultRequired);
221222
}
222223
public set required(value: boolean) {
223224
if (this._defaultRequired === null) {

0 commit comments

Comments
 (0)