title: Angular UI Mask Validation
body: <p>Im using <a href="http://angular-ui.github.io/ui-utils/" rel="nofollow">AngularUI Utils</a> in attempt to mask a date input. However, when I try to test a regex against the field to validate the date format, it returns false every time. </p>
  
  <p><strong>HTML</strong></p>
  
  <pre><code>&lt;div class="row form-group"&gt;
    &lt;div class="col-xs-12"&gt;
      &lt;label&gt;Date of Birth&lt;/label&gt;
      &lt;input class="form-control" ng-model="vm.dateOfBirth" ui-mask="99/99/9999" placeholder="MM/DD/YYYY" /&gt;
    &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p><strong>AngularJS</strong></p>
  
  <pre><code>var dateRegex = /^\d{2}\/\d{2}\/\d{4}$/;
  
  var vm = this;
  vm.dateOfBirth = "";
  
  vm.validateInput = function () {
      return dateRegex.test(vm.dateOfBirth);
  }
  </code></pre>
  
  <p>Is there any other way to validate this input?</p>