In Angular 2.1.0 Reactive forms, I have a form using the formBuilder group function that attempts to use the pattern validator to validate one of the fields.
this.profileForm = this.formBuilder.group({
'email': [this.profile.email, [
Validators.pattern('^[a-z0-9A-Z_]+(\.[_a-z0-9A-Z]+)*@[a-z0-9-A-Z]+(\.[a-z0-9-A-Z]+)*(\.[a-zA-Z]{2,15})$')
]],
//...
As you can see I have manually added the uppercase A-Z on the groups, but I was wondering if there is a way to specify the pattern validator to ignore case. I can't seem to find any examples online, and as I can tell you can't pass in an actual RegExp object it has to be a string.