I have validation at my typeScript. I can validate between 0 and 9 successfully which does not allow me to press except numerical characters. That's fine but the problem is in the second digit it gives me error. The validation below is only find for the first digit. How I can make my validation to available for all inputs not only first digit?
'input2': [this.FormInput.input2,[ Validators.required, Validators.pattern('[0-9]'), ]
patternthat doesn't explicitly match only a single digit.Validators.pattern(/\d*/)that allows 0 or more digits andValidators.pattern(/\d+/)to allow one or more digits