Refactor validate_data_frame. But have problem.