 <pre><code> &lt;form ng-submit="search()" name="searchSideNav"&gt; &lt;div layout="column" layout-align="center"&gt; &lt;md-input-container flex&gt; &lt;label&gt;{{::labels.documentName}}&lt;/label&gt; &lt;input ng-model="searchItems.sDocumentName" ng-required="" name="sDocumentName"&gt; &lt;div ng-show="searchSideNav.sDocumentName.$invalid &amp;&amp; !searchSideNav.sDocumentName.$pristine"&gt; &lt;p ng-show="searchSideNav.sDocumentName.$error.required" class="help-block"&gt;Document is required&lt;/p&gt; &lt;/div&gt; &lt;/md-input-container&gt; &lt;md-button ng-disabled="searchSideNav.$invalid"&gt; Submit &lt;/md-button&gt; &lt;/div&gt; &lt;/form&gt; </code></pre>