New

Just launched: Vueblocks, a brand-new search engine for Vue packages! Explore Vueblocks →

alcea/cif

PHP validation for Romanian VAT code (Validare PHP pentru CIF | CUI)
85,593 2
Install
composer require alcea/cif
Latest Version:1.1.4
PHP:>=5.4.0
License:MIT
Last Updated:Feb 27, 2020
Links: GitHub  ·  Packagist
Maintainer: nicualcea

Build Status Latest Stable Version Total Downloads License Scrutinizer Code Quality

CIF

PHP validation for Romanian VAT code (Validare PHP pentru CIF/ CUI)

How to install?

1. use composer

composer require alcea/cif

2. or, edit require section from composer.json

"alcea/cif": "^1.1"

How to use?

<?php
# require __DIR__ . '\vendor\autoload.php';
use alcea\cif\Cif;

$cifToBeValidated = '159'; // without prefix digit (RO|R)
$cif = new Cif($cifToBeValidated);
echo "CIF {$cifToBeValidated} is " . ( $cif->isValid() ? 'valid' : 'invalid' ) . PHP_EOL;

// or

echo "CIF {$cifToBeValidated} is " . ( Cif::validate($cifToBeValidated) ? 'valid' : 'invalid' ) . PHP_EOL;

How to run tests?

## Open an terminal and run commands:
git clone https://github.com/alceanicu/cif.git
cd cif
composer install
./vendor/bin/phpunit --bootstrap ./vendor/autoload.php --testdox

License

This package is licensed under the MIT license.

Related Packages

alcea/cnp

PHP Validation for Personal Identification Number (Validare PHP pentru Cod Numer...

82,964 11
valorin/random

Random is a simple helper package designed to make it easy to generate a range o...

413,065 233
php
cline/variable-keys

Laravel Blueprint macros for variable primary key and morph types

22,912 0
php
cline/struct

Lean, attribute-driven Laravel data objects with explicit validation and Eloquen...

17,788 0
php
cline/toggl

Advanced feature flag management with strategies, time bombs, and groups

12,171 0
php

Version History

Version Released PHP License
1.1.4 >=5.4.0 MIT
1.1.3 >=5.4.0 MIT
1.1.2 >=5.4.0 MIT