 <p>The way ng-minlength and ng-maxlength work, if the input textbox has fewer or more characters than specified by the two directives, then user.name is not populated (I don't even think it is defined). To see what I mean, add <code>{{user.name}}</code> after the &lt;span>.</p>