function ckeditor5_validation_constraint_alter
Implements hook_validation_constraint_alter().
File
-
core/
modules/ ckeditor5/ ckeditor5.module, line 589
Code
function ckeditor5_validation_constraint_alter(array &$definitions) {
// Add the Symfony validation constraints that Drupal core does not add in
// \Drupal\Core\Validation\ConstraintManager::registerDefinitions() for
// unknown reasons. Do it defensively, to not break when this changes.
if (!isset($definitions['Choice'])) {
$definitions['Choice'] = [
'label' => 'Choice',
'class' => Choice::class,
'type' => FALSE,
'provider' => 'core',
'id' => 'Choice',
];
}
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.