It's to allow extensions, eg 'x 2345' or 'ext 2342'.
'-' is allowed for obvious reasons.. 555-1234

I haven't been able to find any standard way of doing it, but this should
hold up well under i18n.  It's the closest thing to a standard I could find.

Thinking this over, I'm not actually sure if this is the best way to do it.
 An ng-pattern on each input also works.

-Walter


On Mon, May 19, 2014 at 3:18 PM, Igor Minar <notifications@github.com>wrote:

> In src/ng/directive/input.js:
>
> > @@ -16,6 +16,7 @@ var DATETIMELOCAL_REGEXP = /^(\d{4})-(\d\d)-(\d\d)T(\d\d):(\d\d)$/;
> >  var WEEK_REGEXP = /^(\d{4})-W(\d\d)$/;
> >  var MONTH_REGEXP = /^(\d{4})-(\d\d)$/;
> >  var TIME_REGEXP = /^(\d\d):(\d\d)$/;
> > +var TEL_REGEXP = /^[0-9+\(\)#\.\s\/ext-]+$/;
>
> "ext-" as part of the character class? that doesn't look right.
>
> is there some precedence for making this a regular expression that is
> acceptable across all locales? localization of this stuff is usually pretty
> tricky and we can't have US only solution. :-/
>
> —
> Reply to this email directly or view it on GitHub<https://github.com/angular/angular.js/pull/7315/files#r12811211>
> .
>