PHP code example of zaynasheff / validation-rules

1. Go to this page and download the library: Download zaynasheff/validation-rules 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/ */

    

zaynasheff / validation-rules example snippets


use Zaynasheff\ValidationRules\Rules\Age;

$request->validate([
    'birth_date' => [
        '

new Age(min: 18, max: 65)

use Zaynasheff\ValidationRules\Rules\Snils;

$request->validate([
    'snils' => [
        '

use Zaynasheff\ValidationRules\Rules\Inn;

$request->validate([
    'inn' => [
        '
bash
composer analyse
bash
composer fix