But you don't have to use template variables. Just have the error in the template in a hidden div or span, and when the error comes up just show that particular div or span.