I have a field in my reactive angular form and I am trying to add validations to it. In my service class, I am able to use Validators.required which is by default provided by angular as follows
Countrycode: new FormControl('', [Validators.required, Validators.maxLength(12)])
But condition is, If country is Canada then this Validators.required should work else Validators.required is not needed. If country is other then Canada, only maxLength validation is needed as done above. How can I do that?