You want to type decimal, but use digitOnly, so you can't. so use step="0.01"
so that after adding, your value is number
`
problem`
`html
<mat-form-field appearance="outline">
<mat-label>Regular Price</mat-label>
<input formControlName="variationRegularPrice" type="number" digitOnly matInput />
<mat-error>This field is required.</mat-error>
</mat-form-field>
`
solution
`html
<mat-form-field appearance="outline">
<mat-label>Regular Price</mat-label>
<input formControlName="variationRegularPrice" type="number" step="0.01" matInput />
<mat-error>This field is required.</mat-error>
</mat-form-field>
`
Top comments (0)