<div class="form-group">
  <label class="col-sm-{{$ctrl.labelcols}} control-label" for="{{$ctrl.label}}">{{$ctrl.label | translate}}</label>
  <div class="col-sm-{{$ctrl.inputcols}}" ng-class="{ 'has-error': $ctrl.hasError() }">
    <input class="form-control" type="text" name="{{$ctrl.name}}"
      spellcheck="false"
      ng-model="$ctrl.model" id="{{$ctrl.label}}"
      ng-required="{{$ctrl.required != null && $ctrl.required != 'false'}}"
      ng-attr-placeholder="{{$ctrl.placeholder | translate}}"
      ng-attr-minlength="{{$ctrl.minlength}}"
      ng-attr-maxlength="{{$ctrl.maxlength}}"
      focus-if="{{$ctrl.autofocus != null}}"
      typeahead-min-length="$ctrl.typeheadsource != null ? 1 : 1000"
      uib-typeahead="item for item in $ctrl.typeheadsource | filter:$viewValue | limitTo:8">
  </div>
  <div class="col-sm-{{$ctrl.inputcols}} col-sm-offset-{{$ctrl.labelcols}}">
    <validationmessages field="$ctrl.field"></validationmessages>
  </div>
</div>
