Skip to content
Simple ValidationKit for PHP
C PHP
Find file
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
src/ValidationKit
tests
README.md
build.xml
package.ini
phpdox.xml
phpunit-ci.xml
phpunit.xml

README.md

Validation

PatternValidator

$validator = new PatternValidator( '#test test test#' );
$bool = $validator->check( $value );
$msg  = $validator->getMessage();

StringValidator

$validator = new StringValidator(array( 
        'start_with' => '....' , 
        'end_with' => ... ,
        'is' => ...,
        'contains' => ...,
        'except' => ...,
    ));
$bool = $validator->check( $string );
$msg  = $validator->getMessage();

RangeValidator

$validator = new RangeValidator(array(
    'greater_than' => 100,
    'less_than' => 200,
));
$bool = $validator->check( 200 );

$validator = new RangeValidator(array( '>' => 10 , '<' => 200 ));
$bool = $validator->check( 10.0 );
Something went wrong with that request. Please try again.