Template validation