1. Go to this page and download the library: Download jschaedl/iban-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/ */
jschaedl / iban-validation example snippets
use Iban\Validation\Validator;
use Iban\Validation\Iban;
$iban = new Iban('DE89 3704 0044 0532 0130 00');
$validator = new Validator();
if (!$validator->validate($iban)) {
foreach ($validator->getViolations() as $violation) {
echo $violation;
}
}
use Iban\Validation\Validator;
$validator = new Validator([
'violation.unsupported_country' => 'The requested country is not supported!',
'violation.invalid_length' => 'The length of the given Iban is not valid!',
'violation.invalid_format' => 'The format of the given Iban is not valid!',
'violation.invalid_checksum' => 'The checksum of the given Iban is not valid!',
]);