Skip to content

PAJERdesign/pesel-validator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PESEL validator

PESEL validator for Symfony 4.x, 5.x and 6.x.

Installation

1. Composer

From the command line run

$ composer require pajerdesign/pesel-validator

2. Register bundle

Enable the bundle by adding new AJERdesign\PeselValidator\PeselValidator() to the bundles array of the return method in your project's config/bundles.php file:

<?php

    return [
        // ... 
        PAJERdesign\PeselValidator\PeselValidator::class => ['all' => true]
    ];

Example usage

via Attributes

use PAJERdesign\PeselValidator\PeselValidator;

// ...

#[PeselValidator]
private ?string $pesel = null;

public function isSuperUser(): bool
{
    return true;
}

via Annotations

use PAJERdesign\PeselValidator\PeselValidator;

// ...

/**
 * @PeselValidator
 */
public $iban;

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages