I try to customize validator for my form. Validator has two parameters: the first parameter is quantity of digits before point and the second - is quantity of digits after point. And I use these parameters to make a regexp:
new RegExp('^[0-9]{0,' + a + '}([,][0-9]{0,' + b + '})?$')
https://plnkr.co/edit/v4sWLGRHFijvQH6DfRPa?p=preview
But form still doesn't work correctly, message doesn't show if I don't follow regexp while typing into input. And I have no idea how I can use two parameters to validate template driven form using directive.
Help please
patternvalidator directly rather than a custom option.