In validate.ts:
return asyncValidator(control).map(v => {
const secondary = synchronousValid();
if (secondary || v) { // compose async and sync validator results
return Object.assign({}, secondary, v);
}
});
asyncValidator(control) is not an array
My validator looks like this:
...
@Directive({
selector: "[selector-name][ngModel]",
providers: [
{
provide: NG_ASYNC_VALIDATORS, useExisting: SelectorClass, multi: true
}
]
})
export class SelectorClass implements Validator {
...
In validate.ts:
asyncValidator(control)is not an arrayMy validator looks like this: