added validate function to test for leading '0'