Maybe developers should be held to stricter standards than their users. I can demand developers to close tags they are expected to close. But users should be allowed to provide their document numbers as "12345" "123 45" or "12-34-5" if all these notations are used in their country.
Then specify the accepted forms and specify a canonicalization algorithm to translate the acceptable forms into some base representation. Don't just leave it up to implementations.