Add validations on templates