# php-validation **Repository Path**: wowin/php-validation ## Basic Information - **Project Name**: php-validation - **Description**: Another fluent validation library for php - **Primary Language**: Unknown - **License**: MIT - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 1 - **Forks**: 0 - **Created**: 2017-04-24 - **Last Updated**: 2025-01-24 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # PHP-Validation Another fluent validation library for php ## Usage ```php $validator = new Validator(); $validator->ruleFor('field1',function(){ $this->isRequired('required'); $this->isNumber('is number'); })->end()->ruleFor('field2', function(){ $this->hasRange(5, 10, 'range(5,10)'); }); $result = $validator->validate([ 'field1' => 'aaa', 'field2' => '20' ]); echo $result->hasError(); echo $result->getError(); ``` For more information, please see tests in the source code. ## License MIT