gaesi/validator

Gaesi Validator library

v0.1.4 2020-11-02 18:16 UTC

This package is auto-updated.

Last update: 2024-04-27 03:48:01 UTC


README

A PHP library for General Validations.

Validations:

  • Cpf;
  • Cnpj;
  • GS1 (Gtin, Sscc, GtinWithSn);
  • Check digit (mod 10, mod 11 and mod 37)

Usage

<?php

use Gaesi\Validator\CPF;
use Gaesi\Validator\GS1;
use Gaesi\Validator\Mod11;

CPF::validate("12345678909");      // return true
GS1::validateGs1("1234567890123"); // return false
Mod11::calcule("111222333");       // return "1112223339"
Mod11::validate("1112223339");     // return true