title: angularJS valdr + ui-select validation
body: <p>I was googled on this issue but still can't find the right discussion about it. We are using valdr and ui select in a form ( angularJS app ) and we've faced the problem that the input that the ui-select renders won't get a name attribute, and since this, angular throws an error:</p>
  
  <pre><code>Error: Form element with ID "undefined" is not bound to a field name.
  at d.link (http://localhost:8080/bower_components/valdr/valdr.min.js:1:8414)
  at invokeLinkFn (http://localhost:8080/bower_components/angular/angular.js:8141:9)
  at nodeLinkFn (http://localhost:8080/bower_components/angular/angular.js:7653:11)
  at compositeLinkFn (http://localhost:8080/bower_components/angular/angular.js:7009:13)
  at nodeLinkFn (http://localhost:8080/bower_components/angular/angular.js:7648:24)
  at http://localhost:8080/bower_components/angular/angular.js:7884:13
  at processQueue (http://localhost:8080/bower_components/angular/angular.js:13071:27)
  at http://localhost:8080/bower_components/angular/angular.js:13087:27
  at Scope.$get.Scope.$eval (http://localhost:8080/bower_components/angular/angular.js:14287:28)
  at Scope.$get.Scope.$digest (http://localhost:8080/bower_components/angular/angular.js:14103:31) &lt;input type="text" autocomplete="off" tabindex="-1" aria-expanded="true" aria-label="{{ $select.baseTitle }}" aria-owns="ui-select-choices-{{ $select.generatedId }}" aria-activedescendant="ui-select-choices-row-{{ $select.generatedId }}-{{ $select.activeIndex }}" class="form-control ui-select-search ng-pristine ng-untouched ng-valid" placeholder="{{$select.placeholder}}" ng-model="$select.search" ng-show="$select.searchEnabled &amp;amp;&amp;amp; $select.open"&gt;
  </code></pre>
  
  <p>So we were tried some hacks on the ui-select directive like templateCache rewrite / modify, hidden inputs with the same model but the result is the same. </p>
  
  <p>Btw templateCache rewriting is the worst approach because of this directive used in appwide by other directives and we cannot hack on the whole app.</p>
  
  <p>Did anyone faced with this problem?</p>
  
  <p><strong>Code snippet:</strong>
  <a href="http://plnkr.co/edit/sDNDDtnhi7Jxi9mtjDTl?p=preview" rel="nofollow">http://plnkr.co/edit/sDNDDtnhi7Jxi9mtjDTl?p=preview</a></p>