Expected {0} to be a RegExp but was {1}. Element: {2}
This error occurs when 'ngPattern' is passed an expression that isn't a regular expression or doesn't have the expected format.
For more information on valid expression syntax, see 'ngPattern' in input directive docs.