PHP code example of kumatch / discipline

1. Go to this page and download the library: Download kumatch/discipline library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

kumatch / discipline example snippets



use Kumatch\Discipline\Discipline

$value = "A example value.";
$discipline = new Discipline($value, "invalid value.");

$discipline->notNull()->int();

if (!$discipline->isPass()) {
    echo $discipline->getMessage();
}