I think that it would be nice addition if we validate the variables in a template when a user adds them. This will help the users to see if they are using the templates wrong and can suggest missing variables. This can also help when a new mandatory variable is added to a template, it will cause a failure even before the code is generated.
This can be considered as a fail fast approach. The templates written by the users need to be compilable of course.