Excuse my snark :) Angular does not have a strong conventional model layer. The default are thin "models" (basically just JS objects with a bit of persistence logic on top) and the templates do the heavy lifting. I'm not really sure where the best place is to put validation logic like this. Is that appropriate for the API to pass in JSON? What about cases where the client logic differs from the server logic?

I'm not disagreeing with you that this stuff seems out of place in the template. It's a quick and dirty solution but it works and I don't have a good sense for what the better solution looks like yet. We're definitely thinking about it and talking about it, and I'd love your input if you have any.