[PATCH 2/2] Use a new funtion to instead of outing error message for field checking