I can’t get a validation message to show on an input type. I’m using for validator.pattern with Form Group and not sure why it will not show. The mat-error tag will not show. I’m looking for help with a possible solution to this for anything over two decimal places. If someone could help me with this I would appreciate.
html
Code
Breakfast
$
Please provide a valid amount.ts
JavaScript
form: FormGroup = new FormGroup({
bfastAmount: new FormControl('', [Validators.pattern('^\\d{1,2}\\.\\d{2}$')]),
});
Jignesh KumarRank #91 · 22.9K reputationPosted Dec 13, 2021, 10:49 PM EST