title: setValidators is not working if the validation pattern is assigned dynamically
body: <p>I have some function where i m assigning validation dynamically</p>
  
  <pre><code>// set validation from sports response.
    private static setValidation(sportsItem: SportsFormResponse, sportsForm: FormGroup): void {
      const validationTypes: ValidatorFn[] = [];
      // if regex pattern got from questionnaire response.
      if (sportsItem.validation) {
        validationTypes.push(Validators.pattern(sportsItem.validation));
      }
      // if sportsItem is required true.
      if (this.checkBooleanPropertyExistForValidation(sportsItem.isRequired) === true) {
        validationTypes.push(Validators.required);
      }
      if (validationTypes.length &gt; 0) {
        sportsForm.controls[sportsItem.questionId]
          .setValidators(validationTypes);
      }
    }
  </code></pre>
  
  <p>and i m getting response like this</p>
  
  <pre><code>{
        "sportsId": 5473,
        "label": "FVC",
        "answerValue": null,
        "answerCode": null,
        "sportsTypeId": 9,
        "lookupTypeId": null,
        "validation": "^(8\\\\.[0-5]|(0\\\\.0[1-9]|0\\\\.[1-9]([0-9]?)|[1-7]\\\\.[0-9]{1,2}|8\\\\.(?:[0-4][0-9]|50)))$",
        "validationMessage": "{“Please provide a valid result for the predicted FVC. This should be between 0.01 - 8.50"}",
        "sportsCode": "R94",
        "helperText": null,
        "isReadOnly": false,
        "isRequired": true,
        "cssClass": null
      },
  </code></pre>
  
  <p>here what happens when i hardcode value and put in this function then it works fine</p>
  
  <pre><code>if (sportsItem.validation) {
            validationTypes.push(Validators.pattern("^(8\\\\.[0-5]|(0\\\\.0[1-9]|0\\\\.[1-9]([0-9]?)|[1-7]\\\\.[0-9]{1,2}|8\\\\.(?:[0-4][0-9]|50)))$"));
          } 
  
  but when its being assigned dyncmaiclly, validation doesnt work.
  
  if (sportsItem.validation) {
            validationTypes.push(Validators.pattern(sportsItem.validation));
          }
  </code></pre>
  
  <p>i have debugged that the string(sportsItem.validation) is coming perfectly fine.
      i m not sure whats the problem with dynamic validation insertion.</p>
  
  <p><strong>Can anyone please give me a hint for this?</strong></p>