I assume that you need to pass a Regexp type instead of a string , for example:
Validators.pattern(/^\d+\.\d{2}$/)
Here plunker is updated
If you use the string parameter as the parameter to the pattern method, then your Regexp will be modified as shown below.

yurzui
source share