PHP code example of horat1us / yii2-inn-validator

1. Go to this page and download the library: Download horat1us/yii2-inn-validator library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

horat1us / yii2-inn-validator example snippets




use Horat1us\Inn\Yii\InnValidator;
use Horat1us\Inn;
use yii\base;

$validator = new Inn\Yii\Validator([
    'minAge' => 18,
    'maxAge' => 70,
    'enableCheckSum' => true,
]);
$validator->validate('3184710691');

$model = new class extends base\Model {
    public string $inn;
    public function rules(): array {
        return [
            [['inn',], '