It should either return an error or ignore leading/trailing spaces.
Spaces are common when copying numbers from webpages, for example etherscan, bscscan, etc.