If you want to apply conditional validation on 'Second Number' or 'Third Number', then you need to add 'Number Type' input as 'Prime'.
{{numberinfoForm.controls?.numberType?.errors?.primeNumber.message}}
If you want to apply conditional validation on 'Third Number' then you need to add 'Number Type' input as 'Prime'.
Conditional Expression with type 'string'
{{numberinfoForm.controls?.thirdNumber?.errors?.primeNumber.message}}