vaildate and contenttype