How can I validate a required "ui-select" field? The text input field 'prénom' in this image works.
It doesn't work with the following code :
<div class="col-lg-4 col-md-4 col-sm-10 col-xs-12">
<ui-select ng-model="role.selected" theme="selectize" name="role" required>
<ui-select-match placeholder="Selectionnez un rôle">{{$select.selected.titre_role}}</ui-select-match>
<ui-select-choices repeat="role as role in listeRole">
<span ng-bind-html="role.titre_role"></span>
</ui-select-choices>
</ui-select>
<div class="alert alert-danger" style="margin-top:-20px;" ng-show="(f1.role.$dirty|| Submitted) && f1.role.$error.required"><span>Veuillez remplir ce champ</span></div>
</div>
Thank you