le (which informs us that the field <code>myField</code> currently has both the
<code>required</code> and <code>email</code> errors):</p>
<pre><code class="lang-javascript">&lt;!-- keep in mind that ngModel automatically sets these error flags --&gt;
myField.$error = { required : true, email: true, maxlength: false };
</code></pre>
<p>The <code>required</code> message will be displayed to the user since it appears before the <code>email</code> message in the DOM.
Once the user types a single character, the 