phenixphp / validation
Phenix validation layer
Fund package maintenance!
phenixphp
Requires
- php: ^8.1
- adbario/php-dot-notation: ^3.3
- egulias/email-validator: ^4.0
- nesbot/carbon: ^3.1
- ramsey/uuid: ^4.7
- symfony/uid: ^6.0
Requires (Dev)
- friendsofphp/php-cs-fixer: ^3.52.1
- pestphp/pest: ^1.22
- pestphp/pest-plugin-faker: ^1.0
- pestphp/pest-plugin-global-assertions: ^1.0
- pestphp/pest-plugin-parallel: ^1.2
- phpstan/phpstan: ^1.10
- phpunit/phpunit: ^9.5
- rector/rector: ^1.0
- spatie/ray: ^1.41
- symfony/var-dumper: ^6.0
This package is auto-updated.
Last update: 2024-04-17 01:03:56 UTC
README
Phenix framework data validation layer.
Installation
You can install the package via composer:
composer require phenixphp/validation
Documentation
The official documentation for Phenix validation can be found on the Phenix framework website.
Usage
Basic example of validator usage:
use Phenix\Validation\Types\Str; use Phenix\Validation\Validator; $validator = new Validator(); $validator->setRules([ 'name' => Str::required()->min(3)->max(10), 'last_name' => Str::required()->min(3)->max(10), ]); $validator->setData([ 'name' => 'John', 'last_name' => 'Doe', ]); echo $validator->passes() ? 'Data is Ok' : 'Data is invalid';
Testing
composer test
Changelog
Please see CHANGELOG for more information on what has changed recently.
Security Vulnerabilities
If you discover a security vulnerability within Phenix, please send an e-mail to Omar Barbosa via contacto@omarbarbosa.com. All security vulnerabilities will be promptly addressed.
License
The Phenix framework is open-sourced software licensed under the MIT license.