Angular 6 - Validators pattern not working
ng-pattern seem to take a regExp as parameter (like in angularJs) :
Validators.pattern(new RegExp("^(?=.*[A-Z])(?=.*[!@#\$%\^&\*])(?=.{9,}))")
You can also use /..../
Validators.pattern(/^(?=.*[A-Z])(?=.*[!@#\$%\^&\*])(?=.{9,})/)
Should work ;)