PHP code example of oliverkuldmae / php-commons-validator

1. Go to this page and download the library: Download oliverkuldmae/php-commons-validator 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/ */

    

oliverkuldmae / php-commons-validator example snippets




use \PHPCommons\Validator\Rule\Email;

$validator = Email::getInstance();
$validator->isValid('[email protected]'); // => true
$validator->isValid('[email protected]'); // => false