Question: I have the following code. The issue is it isnt showing either view. What am i doing wrong? 

```
.state('app.accessmanager.user.reactivate', {

    url: '/reactivate',
    Views: {
        '': {templateUrl: 'assets/views/accessmanager/reactivate.html'},
        title: 'ReActivate User',
        icon: 'ti-layout-media-left-alt',
        ncyBreadcrumb: {
            label: 'ReActivate User'
        },
        'sideBar': {templateUrl: 'assets/views/partials/AMSidebar.html'}
        }

```

here is the markup. 

```html
<div class="sidebar app-aside" id="sidebar" toggleable parent-active-class="app-slide-off" >
    <div perfect-scrollbar wheel-propagation="false" suppress-scroll-x="true" class="sidebar-container">
        <div ui-view="sideBar"></div>
    </div>
</div>
<div class="app-content" ng-class="{loading: loading}">
 <header data-ng-include=" 'assets/views/partials/top-navbar.html' " class="navbar navbar-default navbar-static-top"></header>
 <div data-ng-include=" 'assets/views/partials/main-content.html' " class="main-content" ></div>
</div>
```

if I do the following, it will at least display the sidebar but not the main content.

```
.state('app.access', {
    url: '/access',
        views: {
            'sideBar': {
                templateUrl: 'assets/views/partials/AMSidebar.html'
            }
        },
    template: '<div ui-view class="fade-in-up"></div>',
    title: 'ACCESS MANAGER',
    ncyBreadcrumb: {
        label: 'ACCESS MANAGER'
    }
})

```

Answer: 
You can use regex:

```
var tel = "123457890";
if (!tel.match(/^\d{10}$/)) {
    console.log("Sorry, incorrect format.");
} else {
    var areaCode = tel.substring(0,3);
    var prefix = tel.substring(3,6);
    var suffix = tel.substring(6,10);
    console.log("(" + areaCode + ") " + prefix + "-" + suffix);
}

```
Here's a fiddle:

<http://jsfiddle.net/e1qq659g/> 

Here's a regex pattern:

<http://regexr.com/3b77b>

```
var regularExpression = /\d{10}/g;
(tel.match(regularExpression)) ? alert("All digits!") : alert("Not Digits!");

```

this will match the expression to the string in variable `tel` - if it does match it alerts "All Digits" - if it does not match it alerts "Not Digits!"