Skip to content

Instantly share code, notes, and snippets.

@ph4un00b
Created August 4, 2016 05:07
Show Gist options
  • Save ph4un00b/303067cffadc4e96cd938af44044e430 to your computer and use it in GitHub Desktop.
Save ph4un00b/303067cffadc4e96cd938af44044e430 to your computer and use it in GitHub Desktop.
<select id='country-selection'
ng-options="option.name for option in vm.countries track by option.code"
ng-model="vm.selectedCountries"
material-select
multiple
name="country_selection" required>
<option disabled value="">Select visitor country (max 3)</option>
</select>
<div ng-if="vm.selectedCountries.length > 3">
<span class="error-text">/Max 3 countries/</span>
</div>
<div ng-messages="JAMON.$error" ng-if="vm.showErrors" role="alert">
<div ng-messages-include="error-messages"></div>
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment