title: angular 5 conditionally validate field based on another field's value
body: <p>How to conditionally validate a field based on another field's value? Here's what i've tried but it seems not to work</p>
  
  <pre><code>this.PDform = _formbuilder.group({
      [...]
      'intlNumber': ['',this.nationality == 'Abroad' ? Validators.compose([Validators.pattern(this.phoneNumberExp), Validators.maxLength(14), Validators.minLength(11), Validators.required]) : Validators ]
      [...]
  })
  </code></pre>