Handle validation recursively and generate paths for better error detection.