$validators should reset model to undefined upon invalid initial value #10286
Description
Simple plnkr in which I'd expect the model value to reset to undefined on load. If I add a 3 and backspace it, the model value is reset to undefined as expected, but that should be the behavior on load as well (things should be consistent):
http://plnkr.co/edit/KcDeisrc1FJAyf4FP5t3?p=preview
It appears that this has been an issue since at least 1.3.0 final (not sure about the beta/rcs). We're in the process of upgrading all of our existing 1.2 directives (which have been resetting model to undefined inside a shared $parsers and $formatters fn), and now that we've moved logic into $validators, our $formatters don't really validate anymore. When an invalid model value comes in, it seems like I need to re-run $validators logic inside $formatters and ensure it returns the correct value, but that seems like a hack more than anything. @Narretz Is there an official workaround for this?