completed logic for error message to determine which field is blank