yandjin / custom-validation
small and simple validation package inspired by laravel validation, no dependencies
Installs: 4
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
pkg:composer/yandjin/custom-validation
This package is not auto-updated.
Last update: 2025-12-20 15:23:09 UTC
README
how to install :
composer require yandjin/custom-validation
how to use
use the following namespace :
use YanDjin\Validation\CustomValidation;
the validation returns true or false :
$arrayOfData = [ "name" => "YanDjin", "age" => 26 ]; if(!CustomValidation::validateData($arrayOfData, [ "name" => "characters", "age" => "numeric|min:18" // pipe the validation rules (: for parameters ) or use array "age" => ["numeric", "min" => 18] ]) { // returns the fields not passing the validation and the errors return CustomValidation::getErrorsMessagesAsString(); }