add post validate function