title: Validate ABN (Australian Business Number)
body: <p>I need some modern C# code to check an Australian Business Number (ABN) is valid.</p>
  
  <p>The requirements loosely are </p>
  
  <ul>
  <li>ABN has been user entered</li>
  <li>Spaces at any point to make the number readable are allowed</li>
  <li>If any other characters besides digits and spaces are included - validation should fail even if there is a legal sequence of digits included</li>
  <li>This check is a precursor to calling the <a href="http://abr.business.gov.au/Webservices.aspx" rel="nofollow">ABN search webservice</a> which will save calls with obviously bad input</li>
  </ul>
  
  <p>Exact rules to validate the number are specified at <a href="https://abr.business.gov.au/HelpAbnFormat.aspx" rel="nofollow">abr.business.gov.au</a> which are omitted here for the sake of brevity and clarity. The rules will not change over time.</p>