Skip to content

Installation

Muhammet Şafak edited this page Jun 10, 2026 · 1 revision

Installation

Requirements

  • PHP 8.1 or newer
  • ext-mbstring (used for Unicode-aware length and case handling)
  • No runtime dependencies beyond the PHP core

Install with Composer

composer require initphp/validation

Then make sure Composer's autoloader is loaded:

require __DIR__ . '/vendor/autoload.php';

Verify the install

<?php
declare(strict_types=1);
require __DIR__ . '/vendor/autoload.php';

use InitPHP\Validation\Validation;

echo Validation::VERSION; // e.g. "2.0.0"

The class you import

Everything is reachable through one class:

use InitPHP\Validation\Validation;

Exceptions live under the InitPHP\Validation\Exception namespace — see Exceptions.

Next

Clone this wiki locally