Add support for template validation