Completed functionality for maxDigits.