<div class="well">
  <p>Please enter your username:</p>

  <form>
    <div class="form-group">
      <label for="username">Username</label>
      <input autofocus class="form-control" id="username" placeholder="Username" type="text" name="userName" ng-model="$ctrl.username" required>
    </div>

    <button type="submit" class="btn btn-default" ng-click="$ctrl.onSubmit()">Submit</button>
  </form>
</div>

<div class="well">
  <p>Please enter your username:</p>

  <form>
    <div class="form-group">
      <label for="username">Username</label>
      <input autofocus class="form-control" id="username" placeholder="Username" type="text" name="userName" ng-model="$ctrl.username" required>
    </div>

    <button disabled=type="submit" class="btn btn-default" ng-disabled="!$ctrl.username" ng-click="$ctrl.onSubmit()">Submit</button>
  </form>
</div>

Disable submit button when username not valid on NamePicker
Disable submit button when username not valid on NamePicker
