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
Breakfast
$
Please provide a valid amount.
ts
form: FormGroup = new FormGroup({
bfastAmount: new FormControl('', [Validators.pattern('^\\d{1,2}\\.\\d{2}$')]),
});
Jignesh KumarPosted Dec 14, 2021, 3:49 AM