You are here

function select_or_other_validation_constraint_alter in Select (or other) 8

Same name and namespace in other branches
  1. 4.x select_or_other.module \select_or_other_validation_constraint_alter()

Implements hook_validation_constraint_alter().

Parameters

&$definitions: An associative array of definitions and classes that use them.

File

./select_or_other.module, line 13
Contains some hook implementations for the select or other module

Code

function select_or_other_validation_constraint_alter(&$definitions) {

  // Work around core issue #2643308 by overriding the AllowedValuesConstraint.
  $definition =& $definitions['AllowedValues'];
  $definition['class'] = 'Drupal\\select_or_other\\Plugin\\Validation\\AllowedValuesConstraint';
  $definition['provider'] = 'select_or_other';
}