title: How to validate dropdown using angularjs?
body: <p>I have one text box and dropdown bar .if user enter anything in textbox we need ask user to select anyone from dropdown list (which means user is required).if user removed entered value from text box then user no need to select dropdown (which means text box might be empty and so no need to slect dropdown list) help me out to move forward .
  i have added my code below </p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>angular
    .module('MyApp',['ngMaterial', 'ngMessages', 'material.svgAssetsCache'])
      .controller('DemoCtrl', function ($scope) {
          $scope.users = ['','abs','xcv'];
      
        
     
      })
         
     
    .config(function($mdThemingProvider) {
  
      
  
      $mdThemingProvider.theme('docs-dark', 'default')
        .primaryPalette('green')
        .dark();
  
    });</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code> &lt;link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto:300,400,500,700,400italic"&gt;
      &lt;link rel='stylesheet prefetch' href='https://cdn.gitcdn.link/cdn/angular/bower-material/v1.1.5/angular-material.css'&gt;
      &lt;link rel='stylesheet prefetch' href='https://material.angularjs.org/1.1.5/docs.css'&gt;
      &lt;div ng-controller="DemoCtrl" layout="column" ng-cloak="" class="md-inline-form inputdemoBasicUsage" ng-app="MyApp"&gt;
  
          &lt;md-card class="asd"&gt;
    &lt;div &gt;
         &lt;form name="form"&gt;
          &lt;div layout-gt-sm="row"&gt;
            &lt;md-input-container class="md-block" layout-xs&gt;
              &lt;label&gt;User&lt;/label&gt;
              &lt;md-select ng-model="" &gt;
                &lt;md-option ng-repeat="user in users" value="{{user}}"&gt;{{user}}&lt;/md-option&gt;
              &lt;/md-select&gt;
            &lt;/md-input-container&gt;
            &lt;md-input-container class="md-block" flex-xs&gt;
              &lt;label&gt;Name&lt;/label&gt;
              &lt;input ng-model="name" &gt;
            &lt;/md-input-container&gt;
            
           
          &lt;/div&gt;
          
         &lt;/form&gt;
  
    &lt;/div&gt;
      
    &lt;/md-card&gt;
             
  
      &lt;/div&gt;
       &lt;script src='https://ajax.googleapis.com/ajax/libs/angularjs/1.5.5/angular.js'&gt;&lt;/script&gt;
      &lt;script src='https://ajax.googleapis.com/ajax/libs/angularjs/1.5.5/angular-animate.min.js'&gt;&lt;/script&gt;
      &lt;script src='https://ajax.googleapis.com/ajax/libs/angularjs/1.5.5/angular-route.min.js'&gt;&lt;/script&gt;
      &lt;script src='https://ajax.googleapis.com/ajax/libs/angularjs/1.5.5/angular-aria.min.js'&gt;&lt;/script&gt;
      &lt;script src='https://ajax.googleapis.com/ajax/libs/angularjs/1.5.5/angular-messages.min.js'&gt;&lt;/script&gt;
      &lt;script src='https://s3-us-west-2.amazonaws.com/s.cdpn.io/t-114/svg-assets-cache.js'&gt;&lt;/script&gt;
      &lt;script src='https://cdn.gitcdn.link/cdn/angular/bower-material/v1.1.5/angular-material.js'&gt;&lt;/script&gt;</code></pre>
  </div>
  </div>
  </p>