library rut
Chilean Rut validator
juanstiza/rut
Chilean Rut validator
- Monday, June 15, 2015
- by juanstiza
- Repository
- 1 Watchers
- 0 Stars
- 12 Installations
- PHP
- 0 Dependents
- 0 Suggesters
- 0 Forks
- 0 Open issues
- 3 Versions
- 0 % Grown
Installation
Composer
composer require juanstiza/rut master-dev
or copy in your composer.json file, (*1)
{
"require": {
"juanstiza/rut": "master-dev"
}
}
Usage
use JuanStiza\Rut\Rut;
$rut = new Rut(1234567,8);
print_r( $rut->dv );
/* '8' */
print_r( $rut->rut );
/* '1234567' */
print_r( $rut->isValid );
/* false */
$otherRut = new Rut("11.111.111-1");
print_r( $otherRut->isValid );
/* true */
$yetAnotherRut = new Rut('111111111');
print_r( $yetAnotherRut->isValid );
/* true */
Find the verifying digit for a rut
print_r(Rut::findDV(1234));
/* 3 */
Return formated string:
$rut = new Rut('24232771-3');
print_r($rut->format());
/* "24.232.771-3" */
print_r($rut->format('','-'));
/* "24232771-3" */
dev-master
9999999-dev
Chilean Rut validator
Sources
Download
MIT
The Requires
The Development Requires
by
Juan Stiza
validator
rut
chile
0.1.0
0.1.0.0
Chilean Rut validator
Sources
Download
MIT
The Requires
The Development Requires
by
Juan Stiza
validator
rut
chile
0.0.1
0.0.1.0
Chilean Rut validator
Sources
Download
MIT
The Requires
The Development Requires
by
Juan Stiza
validator
rut
chile