function auto_entitylabel_validation_constraint_alter in Automatic Entity Label 8
Same name and namespace in other branches
- 8.3 auto_entitylabel.module \auto_entitylabel_validation_constraint_alter()
- 8.2 auto_entitylabel.module \auto_entitylabel_validation_constraint_alter()
Implements hook_validation_constraint_alter().
Override core NotNull constraint to allow entities that use Auto Entity Labels to validate when their label is empty before being set automatically.
File
- ./
auto_entitylabel.module, line 118 - Allows hiding of entity label fields and automatic label creation.
Code
function auto_entitylabel_validation_constraint_alter(array &$definitions) {
$definitions['NotNull']['class'] = 'Drupal\\auto_entitylabel\\Plugin\\Validation\\EntityLabelNotNullConstraint';
}