PHP code example of x-adam / tr-tax-number-validation

1. Go to this page and download the library: Download x-adam/tr-tax-number-validation 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/ */

    

x-adam / tr-tax-number-validation example snippets


use XAdam\TrTaxNumberValidation;

TrTaxNumberValidation::validate(3973535717);   // true
TrTaxNumberValidation::validate('3973535717'); // true
TrTaxNumberValidation::validate('1234567891'); // false

TrTaxNumberValidation::validate('not a number'); // false
TrTaxNumberValidation::validate('');             // false
TrTaxNumberValidation::validate('397353571');    // false (9 digits)