This is what my form looks like in the plunker.
I've added ng-message validation on my email field. To make it more user-friendly I'm showing the error message on blur and to achieve this I used ng-model-options="{ updateOn: 'blur' }". I also have a Hide button to hide the form. So far it works fine.
Problem:
- If I type an invalid email address in the field and click outside, error message shows. But If I type an invalid email and click the
Hide Formbutton I want to hide the form instead of showing the error message first.
N.B. Strangely sometimes Hide Form works as expected but most of the time it does not. and I'm not sure why.
- It's optional: Can I hide my error message again if I focus back the input field? I think it'll improve the UX a bit.
Working Plunker

