locastic/oib-validator

Symfony person identification number validator based on constraints which are based on the Country regulation.

v1.0.3 2018-08-17 15:38 UTC

This package is auto-updated.

Last update: 2024-04-22 04:19:53 UTC


README

Symfony oib validator based on oib rules for Croatian citizens ID number which include rules determined and assigned by the Tax Administration like mod 11 check digit.

68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f6c6f6361737469632f6f69622d76616c696461746f722e737667 68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f4c6f6361737469632f6f69622d76616c696461746f722e737667 68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f4c6f6361737469632f4f696256616c696461746f722f6d61737465722e737667 68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f672f4c6f6361737469632f4f696256616c696461746f722e737667 68747470733a2f2f706f7365722e707567782e6f72672f6c6f6361737469632f6f69622d76616c696461746f722f646f776e6c6f616473

Overview

The Personal identification number (hrv. Osobni identifikacijski broj or OIB) is a permanent national identification number of every Croatian citizen and legal persons domiciled in the Republic of Croatia.

Installation

composer require locastic/oib-validator

Annotations

If you are using annotations for validation, include the constraints namespace:

use Locastic\Component\OibValidator\Validator\Constraints as LocasticOib;

and then add the OibValidator constraint to the relevant field:

/**
 * @LocasticOib\OibValidator
 */
protected $oib;

YAML

App\Entity\Company:
    properties:
        oib:
            - Locastic\Component\OibValidator\Validator\Constraints\OibValidator

Support

Need help at your project? Write us an email on info@locastic.com