I need help implementing validation for inputting prices on a form. For example, if a user types in $20.0000, I want a validation message to appear marking the input as invalid. Would this type of validation require regex, and if so, how would I go about implementing it? I am unsure of the steps needed to achieve this and would greatly appreciate any guidance or potential solutions.
<mat-form-field appearance="legacy" floatLabel="always">
<mat-label>Breakfast</mat-label>
<input
matInput
type="number"
class="example-right-align"
placeholder="0"
[formControl]="bfastamountCtrl"
[value]="bfastamountCtrl.value | number: '1.2-2'"
/>
<span matPrefix>$ </span>
</mat-form-field>