Move the check digit validation out of the regular digit validation for loop.