PHP code example of ifunk / abn-validator
1. Go to this page and download the library: Download ifunk/abn-validator library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
ifunk / abn-validator example snippets
AbnValidator::isValidAbn('53 004 085 616'); // -> true
AbnValidator::isValidAbn('0'); // -> false
AbnValidator::isValidAcn('005 749 986'); // -> true
AbnValidator::isValidAcn('53 004 085 616'); // -> false (that's an ABN!)
AbnValidator::isValidAbnOrAcn('53 004 085 616'); // -> true
AbnValidator::isValidAbnOrAcn('005 749 986'); // -> true
AbnValidator::isValidAbnOrAcn('0'); // -> false