Angular 2 form status is always invalid with custom validation for ng-select control
问题 I have used validation in user info form as below. this.userInfoForm = this.fb.group({ retrieveId: [''], customerName: [[],[UtilityService.checkMinLength(3, 50)]], }); I have created below service to check validation @Injectable() export class UtilityService { static checkMinLength(min: number, max: number): ValidatorFn { return (c: AbstractControl) => { if (c.value && c.value != undefined) { return { 'checkMinLength': c.value.some((a) => { if (a.itemName.length < min || a.itemName.length >