Any claim against the county presented by a member of the board for per diem and mileage or for service rendered by him shall be itemized, verified, and state that the expense was actually incurred or the service was actually rendered. Before allowance, any such claim shall be presented to the district attorney or county counsel, who shall endorse upon it his written opinion as to its legality. If the district attorney or county counsel declares the claim or any part thereof illegal, he shall state specifically wherein it is illegal, and the claim or such part shall be rejected by the board.