Skip to content
Validate emails using validator.pizza
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
DependencyInjection
Objects
Resources/config
Services
.gitignore
LICENSE
README.md
ValidatorPizzaBundle.php
composer.json

README.md

Validator Pizza

Symfony integration to the disposable email validator

For more info please see: https://www.validator.pizza

Usage

Use this as a simple service:

For instance inside a controller:

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

// 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();

Installation

For Symfony >= 2.1.*

Require the bundle in your composer.json file:

{
    "require": {
        "thelan/validator-pizza": "~1.0",
    }
}

Register the bundle:

// app/AppKernel.php

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

Install the bundle:

$ composer update thelan/validator-pizza
You can’t perform that action at this time.