validate the post form