Phenix framework data validation layer.
You can install the package via composer:
composer require phenixphp/validation
The official documentation for Phenix validation can be found on the Phenix framework website.
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';
composer test
Please see CHANGELOG for more information on what has changed recently.
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.
The Phenix framework is open-sourced software licensed under the MIT license.