angularjs - How do I change the border color on ui-select when required data is missing -


i have angularui ui-select required field , need change border color when user tries submit form without selecting value it. here html:

<ui-select required ng-model="user.manageruser" name="manager" theme="bootstrap"              ng-class="{'requiredborder': form.$submitted && form.manager.$error.required}">    <ui-select-match>{{$select.selected.username}}</ui-select-match>    <ui-select-choices repeat="manager in managers">      <div ng-bind-html="manager.username | highlight: $select.search"></div>    </ui-select-choices>  </ui-select>

this fails because generated html adds "{open: $select.open}" ng-class actual ng-class angular tries parse looks like:

ng-class="{'requiredborder', submitted && form.manager.$error.required} {open: $select.open}"

and angular gags on second set of curly braces. appreciated.


Comments

Popular posts from this blog

twig - Using Twigbridge in a Laravel 5.1 Package -

firemonkey - How do I make a beep sound in Android using Delphi and the API? -

jdbc - Not able to establish database connection in eclipse -