How can I validate an input of type=\"number\" to only be valid if the value is numeric or null using only Reactive Forms (no directives)? Only numbers
type=\"number\"
In HTML file you can add ngIf for you pattern like this
Number Only
In .ts file you can add the Validators pattern - "^[0-9]*$"
this.Mobile = new FormControl('', [ Validators.required, Validators.pattern("^[0-9]*$"), Validators.minLength(8), ]);