There is no native number validator (https://angular.io/api/forms/Validators), but you can easily do a pattern Validators.pattern('^[0-9]*$').
But even with the validator, the user can still type any character, then get an error or not. How can I have a simple input that will only accept numbers?
Edit: my input="number" was overwritten by other code that I missed, so my bad, matInput does work as a native input when you set it to number.
Use a directive to enforce input field, which will ensure that only numbers are accepted in the input field.
Create a OnlyNumberDirective like below and use it in template
This directive accept only numeric values in the input field by filtering out any non-numeric characters as the user types.