validate template code in plain elements

closes #43