2017 © Pedro Peláez
 

symfony-bundle validator-pizza

Integrates validator.pizza with Symfony.

image

thelan/validator-pizza

Integrates validator.pizza with Symfony.

  • Thursday, February 15, 2018
  • by thelan
  • Repository
  • 1 Watchers
  • 0 Stars
  • 20 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 4 Versions
  • 0 % Grown

The README.md

Validator Pizza

Symfony integration to the disposable email validator, (*1)

For more info please see: https://www.validator.pizza, (*2)

Usage

Use this as a simple service:, (*3)

For instance inside a controller:, (*4)

// 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:, (*5)

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

Register the bundle:, (*6)

// app/AppKernel.php

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

Install the bundle:, (*7)

$ composer update thelan/validator-pizza

The Versions