You are here

EmailConstraint.php in Zircon Profile 8.0

File

core/lib/Drupal/Core/Validation/Plugin/Validation/Constraint/EmailConstraint.php
View source
<?php

/**
 * @file
 * Contains \Drupal\Core\Validation\Plugin\Validation\Constraint\EmailConstraint.
 */
namespace Drupal\Core\Validation\Plugin\Validation\Constraint;

use Symfony\Component\Validator\Constraints\Email;

/**
 * Count constraint.
 *
 * Overrides the symfony constraint to use the strict setting.
 *
 * @Constraint(
 *   id = "Email",
 *   label = @Translation("Email", context = "Validation")
 * )
 */
class EmailConstraint extends Email {
  public $strict = TRUE;

  /**
   * {@inheritdoc}
   */
  public function validatedBy() {
    return '\\Symfony\\Component\\Validator\\Constraints\\EmailValidator';
  }

}

Classes

Namesort descending Description
EmailConstraint Count constraint.