I need help with toggling an error area on my form so that it only appears once there is input. It seems unnecessary for errors to show up if the user hasn't even started typing.
<form name="registerForm">
<input type="email" name="email" ng-model="email" required />
</form>
<span ng-show="registerForm.email.$invalid">
Invalid email.
</span>
While this setup works when I'm actively typing, I want to prevent any errors from showing up when the input is empty. I've attempted to use the model ng-hide="!email.length"
, but I can't seem to make it work as intended.