validate header length