Skip to content

WRonX/PHPIsanNumberValidator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PHP ISAN Number Validator

This piece of poorly written code may help you with validating and formatting ISAN Number. Or may not. I don't know, I'm a plumber, not a fortune-teller.

License:

Copyright © 2016 github.com/WRonX
This work is free. You can redistribute it and/or modify it under the terms of the Do What The Fuck You Want To Public License, Version 2, as published by Sam Hocevar. See http://www.wtfpl.net/ for more details.

Features:

  • validating ISAN Number
  • formatting ISAN Number
  • ...
  • PROFIT

Installation and configuration:

php composer.phar require wronx/php-isan-number-validator "dev-master"

Usage

Seriously...? OK, OK...

Validating ISAN Number
use WRonX\Utils\IsanNumberValidator;
// ...
$isanNumber = '0000000160aa0004W00000000f';
$isNumberValid = IsanNumberValidator::validate($isanNumber);
Formatting ISAN Number
use WRonX\Utils\IsanNumberValidator;
// ...
$isanNumber = '0000000160aa0004W00000000f';
$formattedIsanNumber = IsanNumberValidator::format($isanNumber);

Summary

Oh, come on, I spent enough time writing readme already...