'Require only one selection from repeated selection field
I encountered a problem with this code, so there's a multiple selection field(generated using ng-repeat). My question is, is there a way where I can make the first selection (from the multiple selections) required without affecting the remaining 3 selections?
<div class="col-sm-3">
<select chosen="template.accOptions.laccOptions"
name="{{ 'AccountId' + $index }}"
ng-model="Map.AccountId"
ng-options="Account.id as (Account.name +'('+ glAccount.glCode +')')
for Account in template.accOptions.laccOptions"
class="form-control">
<option value="" ng-disabled="Map.required">
{{'label.menu.selectone' | translate}}
</option>
</select>
</div>
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
