phpsoftbox / validator-db
Database validation contract for the PhpSoftBox framework
v1.0.2
2026-02-06 10:45 UTC
Requires
- php: ^8.4
Requires (Dev)
- phpunit/phpunit: ^11.2
This package is auto-updated.
Last update: 2026-03-06 11:00:51 UTC
README
Контракты для интеграции валидатора с базой данных.
Установка
composer require phpsoftbox/validator-db
Использование
use PhpSoftBox\Validator\Db\Contracts\DatabaseValidationAdapterInterface; final class MyAdapter implements DatabaseValidationAdapterInterface { public function exists(string $table, array $criteria, ?string $connection = null): bool { // ... } public function unique( string $table, array $criteria, ?string $connection = null, ?string $ignoreColumn = null, mixed $ignoreValue = null, ): bool { // ... } }
Лицензия
MIT