Mat-input limit format to two decimal places

I am trying to limit the amount of spaces after the decimal points to two numbers in a mat-input that uses a dollar amount. Currently someone can type in as many numbers as they want after the decimal point. I am not sure how to do this and looking for help with a possible solution to this.

Demo

html

<mat-form-field>
 <input
   matInput
  placeholder="Amount"
  type="number"
  class="example-right-align"
  [formControl]="bfastamountCtrl"
  [value]="bfastamountCtrl.value | number: '1.2-2'"
/>
 <span matPrefix>$&nbsp;</span>
</mat-form-field>

ts

bfastamountCtrl = new FormControl(null, { updateOn: 'blur' });

Hi @wingnut8492

You could try adding the step attribute step="0.01" to the input? Some browers still allow typing a longer decimal into this but round it later.

Cheers,
Billy :cowboy_hat_face: