function hook_validation_constraint_alter
Same name in other branches
- 8.9.x core/core.api.php \hook_validation_constraint_alter()
- 10 core/core.api.php \hook_validation_constraint_alter()
- 11.x core/core.api.php \hook_validation_constraint_alter()
Alter validation constraint plugin definitions.
Parameters
array[] $definitions: The array of validation constraint definitions, keyed by plugin ID.
See also
\Drupal\Core\Validation\ConstraintManager
\Drupal\Core\Validation\Annotation\Constraint
Related topics
1 function implements hook_validation_constraint_alter()
Note: this list is generated by pattern matching, so it may include some functions that are not actually implementations of this hook.
- ckeditor5_validation_constraint_alter in core/
modules/ ckeditor5/ ckeditor5.module - Implements hook_validation_constraint_alter().
1 invocation of hook_validation_constraint_alter()
- ConstraintManager::__construct in core/
lib/ Drupal/ Core/ Validation/ ConstraintManager.php - Overrides \Drupal\Component\Plugin\PluginManagerBase::__construct().
File
-
core/
core.api.php, line 2311
Code
function hook_validation_constraint_alter(array &$definitions) {
$definitions['Null']['class'] = '\\Drupal\\mymodule\\Plugin\\Validation\\Constraints\\MyClass';
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.