mirror of
https://github.com/Karaka-Management/phpOMS.git
synced 2026-01-11 17:58:41 +00:00
41 lines
787 B
PHP
Executable File
41 lines
787 B
PHP
Executable File
<?php
|
|
/**
|
|
* Jingga
|
|
*
|
|
* PHP Version 8.2
|
|
*
|
|
* @package phpOMS\Validation\Finance
|
|
* @copyright Dennis Eichhorn
|
|
* @license OMS License 2.0
|
|
* @version 1.0.0
|
|
* @link https://jingga.app
|
|
*/
|
|
declare(strict_types=1);
|
|
|
|
namespace phpOMS\Validation\Finance;
|
|
|
|
use phpOMS\Validation\ValidatorAbstract;
|
|
|
|
/**
|
|
* Validate BIC
|
|
*
|
|
* @package phpOMS\Validation\Finance
|
|
* @license OMS License 2.0
|
|
* @link https://jingga.app
|
|
* @since 1.0.0
|
|
*/
|
|
final class BIC extends ValidatorAbstract
|
|
{
|
|
/**
|
|
* {@inheritdoc}
|
|
*/
|
|
public static function isValid(mixed $value, ?array $constraints = null) : bool
|
|
{
|
|
if (!\is_string($value)) {
|
|
return false;
|
|
}
|
|
|
|
return (bool) \preg_match('/^[a-z]{6}[0-9a-z]{2}([0-9a-z]{3})?\z/i', $value);
|
|
}
|
|
}
|