Constraint::$type

Same name and namespace in other branches
  1. 9 core/lib/Drupal/Core/Validation/Annotation/Constraint.php \Drupal\Core\Validation\Annotation\Constraint::type
  2. 8.9.x core/lib/Drupal/Core/Validation/Annotation/Constraint.php \Drupal\Core\Validation\Annotation\Constraint::type
  3. 10 core/lib/Drupal/Core/Validation/Annotation/Constraint.php \Drupal\Core\Validation\Annotation\Constraint::type

DataType plugin IDs for which this constraint applies.

Valid values are any types registered by the typed data API, or an array of multiple type names. For supporting all types, FALSE may be specified. The key defaults to an empty array, which indicates no types are supported.

Type: string|string[]|false

See also

\Drupal\Core\TypedData\Annotation\DataType

File

core/lib/Drupal/Core/Validation/Annotation/Constraint.php, line 51

Class

Constraint
Defines a validation constraint annotation object.

Namespace

Drupal\Core\Validation\Annotation

Code

public $type = [];

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.