improve-template-validation