I\'m currently writing a simple form in ionic 2 (Angular 2). I was wondering how I\'d add a simple regular expression pattern to the validation:
I basically have this:>
Add the pattern to a variable
var pattern=/06([0-9]{8})/;
and bind the attribute to it
Seems this PR https://github.com/angular/angular/pull/6623/files needs to land first.
There is still an open issue https://github.com/angular/angular/issues/7595
This prevents pattern
being bound to. The pattern needs to be statically added to the DOM (without binding) to work.