boshurik/symfony-constraints

This package is abandoned and no longer maintained. The author suggests using the boshurik/ru-constraints package instead.

Symfony constraints for Russian specific IDs

2.1.2 2024-01-22 13:41 UTC

This package is auto-updated.

Last update: 2024-01-22 13:46:02 UTC


README

Port of php-data-validation

  • Bik
  • Inn
  • Kpp
  • Ogrn
  • Ogrnip
  • Snils
  • Ks
  • Rs

Symfony integration

services:
    _defaults:
        autowire: true
        autoconfigure: true

    BoShurik\Constraints\Ru\BikValidator: ~
    BoShurik\Constraints\Ru\InnValidator: ~
    BoShurik\Constraints\Ru\KppValidator: ~
    BoShurik\Constraints\Ru\KsValidator: ~
    BoShurik\Constraints\Ru\OgrnipValidator: ~
    BoShurik\Constraints\Ru\OgrnValidator: ~
    BoShurik\Constraints\Ru\RsValidator: ~
    BoShurik\Constraints\Ru\SnilsValidator: ~

without autoconfigure:

services:
    BoShurik\Constraints\Ru\BikValidator:
        tags: ['validator.constraint_validator']
    BoShurik\Constraints\Ru\InnValidator:
        tags: ['validator.constraint_validator']
    BoShurik\Constraints\Ru\KppValidator:
        tags: ['validator.constraint_validator']
    BoShurik\Constraints\Ru\KsValidator:
        tags: ['validator.constraint_validator']
    BoShurik\Constraints\Ru\OgrnipValidator:
        tags: ['validator.constraint_validator']
    BoShurik\Constraints\Ru\OgrnValidator:
        tags: ['validator.constraint_validator']
    BoShurik\Constraints\Ru\RsValidator:
        tags: ['validator.constraint_validator']
    BoShurik\Constraints\Ru\SnilsValidator:
        tags: ['validator.constraint_validator']