Added validation of results in templates