Removing default error message from angular form on submit
<p>Removing default <code>error message</code> from <code>angular</code> form on submit</p>

<pre><code>&lt;input name="cardrouting" ng-change="cl(rn, 9)"  ng-model-options="{ updateOn: 'default' , allowInvalid:'true'}" ng-model="rn" type="text" pattern="[0-9]*" class="form-control" required /&gt;
&lt;span class="error-message" ng-show="form.cardrouting.$invalid &amp;&amp; form.$submitted &amp;&amp; form.cardrouting.$error.required"&gt;Please enter a number&lt;/span&gt;
</code></pre>

<p>When i click on submit it always shows the below error message instead of <strong>"Please enter a number"</strong></p>

<p><a href="https://i.stack.imgur.com/bD5Dz.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/bD5Dz.jpg" alt="enter image description here"></a></p>