title: How do you use multiple arguments in Custom Validation Directives in Angular 5?
body: <p>For example, the Angular documentation <a href="https://angular.io/guide/form-validation" rel="nofollow noreferrer">here</a> uses the following directive for the forbiddenName validation:</p>
  
  <pre><code>@Directive({
    selector: '[appForbiddenName]',
    providers: [{provide: NG_VALIDATORS, useExisting: ForbiddenValidatorDirective, multi: true}]
  })
  export class ForbiddenValidatorDirective implements Validator {
    @Input('appForbiddenName') forbiddenName: string;
  
    validate(control: AbstractControl): {[key: string]: any} {
      return this.forbiddenName ? forbiddenNameValidator(new RegExp(this.forbiddenName, 'i'))(control)
                                : null;
    }
  }
  </code></pre>
  
  <p>Is it possible to use a @Input of say <code>Object</code> or <code>string[]</code> instead of only allowing strings? If not, how do you pass in multiple arguments?</p>
  
  <p>The Angular docs uses it in the example as such:</p>
  
  <pre><code>&lt;input id="name" name="name" class="form-control"
         required minlength="4" appForbiddenName="bob"
         [(ngModel)]="hero.name" #name="ngModel" &gt;
  </code></pre>