comphp / validation
Standalone validation rules, results, and input validation support for PHP applications.
Requires
- php: ^8.5
Requires (Dev)
- friendsofphp/php-cs-fixer: ^3.95
- phpunit/phpunit: ^13.1
This package is auto-updated.
Last update: 2026-05-17 19:34:19 UTC
README
CommonPHP Validation provides standalone validation rules, results, and input validation support for PHP and CommonPHP applications. It validates structured data without requiring HTTP, runtime, database, or UI dependencies.
The package is intended to remain small, reusable, and independent so it can be used by actions, forms, config, security, APIs, or standalone PHP code.
Requirements
- PHP
^8.5
Installation
Once this package is available through your Composer repositories, install it with:
composer require comphp/validation
Usage
<?php // TODO: Write usage
Package Notes
This package should stay standalone and usable outside the full CommonPHP runtime. It should provide validation rules, validation results, and reusable input/object validation behavior.
Error Handling
Validation failures should normally return validation result objects. Invalid rule definitions or internal validation errors should throw CommonPHP validation exceptions.
Documentation
License
MIT. See LICENSE.md.