public ConstraintManager::registerDefinitions()
Callback for registering definitions for constraints shipped with Symfony.
ConstraintManager::__construct()
public function registerDefinitions() { $this->getDiscovery()->setDefinition('Callback', array( 'label' => new TranslatableMarkup('Callback'), 'class' => '\Symfony\Component\Validator\Constraints\Callback', 'type' => FALSE, )); $this->getDiscovery()->setDefinition('Blank', array( 'label' => new TranslatableMarkup('Blank'), 'class' => '\Symfony\Component\Validator\Constraints\Blank', 'type' => FALSE, )); $this->getDiscovery()->setDefinition('NotBlank', array( 'label' => new TranslatableMarkup('Not blank'), 'class' => '\Symfony\Component\Validator\Constraints\NotBlank', 'type' => FALSE, )); $this->getDiscovery()->setDefinition('Email', array( 'label' => new TranslatableMarkup('Email'), 'class' => '\Drupal\Core\Validation\Plugin\Validation\Constraint\EmailConstraint', 'type' => array('string'), )); }
© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/core!lib!Drupal!Core!Validation!ConstraintManager.php/function/ConstraintManager::registerDefinitions/8.1.x