While adding the length check is valid for a pure coding solution, the most practical reason where leading zero's are necessary is for values that are required to be a fixed length such as SSN's.
If a value initially exceeded that fixed length, it most likely would have been trapped out as an invalid entry before it reached the length adjustment code.
- Log in to post comments