angular/angular.js — pull request #4295 by sudodoki (2013-10-06 09:25:32+00:00)
Title: Trying to make input to work with ngList by creating regexp dynamically

Tried to solve Issue #4185.
Didn't quite manage to do that (I hope, yet), since I ran into some troubles.
Right now I focused mainly on input type='email', but number and urls can be fixed likewise.
I've got one failing spec: [input with type email and custom separator](https://github.com/sudodoki/angular.js/compare/fixing_ngList_w_inputs?expand=1#diff-ce6d0f141f60d25eede7abf044d04b93R763) - I'm getting:
```
Expected undefined to equal [ 'vojta@google.com', 'igor.minar@gmail.com' ].
Expected to have ng-valid and not have ng-invalid but had ng-dirty ng-invalid ng-invalid-email.
Expected true to be false.
```
this is due to adding emailValidator to ctrl.$parsers, so if I do something along lines
```
if (!('ngList' in attr)) {
ctrl.$parsers.push(emailValidator);
}
```
it will make values to be parsed right, but not valid, also will fail [default email+ngList(default separator)](https://github.com/sudodoki/angular.js/compare/fixing_ngList_w_inputs?expand=1#diff-ce6d0f141f60d25eede7abf044d04b93R744) test.

How to address these things? Should another function be created for $parsers? Should we just add by-pass validator, so that either default regexp or that set by `pattern` attribute should be used? How will this affect dirty-check? Should some kind of memoization be applied? Maybe, plain emails should be left as is, and only for special cases (not sure, wheter only ngList is so special) dynamic regexp should be used?
Sorry for these many questions, but I really want to contribute and solve the issue I ran into.