How to validate to show error after input field complete in Ionic
<p>*Hi,
I am new to angularJS.Now I am trying to show error after complete  text  in Input .but i got error message at start to  type text in Input.Please help out to find solution .thanks in advance.My code is</p>

<pre><code>&lt;label class="item item-input" class="form-group" data-ng-class="   {'has-error':!myForm.zipCode.$valid}"&gt;
&lt;span class="input-label"&gt;Zip Code&lt;/span&gt;
&lt;input type="text" ng-model="currentUser.zipCode"  class="form-control" id="zipCode" name="zipCode"  ng-pattern="/^(\d{5}-\d{4}|\d{5})$/" required="" &gt;
&lt;/label&gt;
&lt;span   ng-show="myForm.zipCode.$error.pattern" class="help-block"   style="color:red;" role="alert"&gt;Please enter proper Zip Code&lt;/span&gt;*
</code></pre>