PHP code example of thelan / validator-pizza

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

    

thelan / validator-pizza example snippets


// Validate an email address :
$email = $this->get('thelan.validator_pizza')->validate('[email protected]');

// Validate an domain:
$domain = $this->get('thelan.validator_pizza')->validate('example.com');

// check if the MX exist:
$email->isMx();

// Check if listed as disposable:
$email->isDisposable();

// app/AppKernel.php

public function registerBundles()
{
    $bundles = array(
        // [...]
        new thelan\ValidatorPizzaBundle\ValidatorPizzaBundle(),
        // [...]
    );
}