Search for constraints

  1. Search 7.x for constraints
  2. Search 8.9.x for constraints
  3. Search 10.3.x for constraints
  4. Search 11.x for constraints
  5. Other projects
Title Object type File name Summary
FieldConfigBase::getConstraints function core/lib/Drupal/Core/Field/FieldConfigBase.php
FieldConfigBase::setConstraints function core/lib/Drupal/Core/Field/FieldConfigBase.php
FieldConfigBase::setPropertyConstraints function core/lib/Drupal/Core/Field/FieldConfigBase.php
FieldConfigInterface::addPropertyConstraints function core/lib/Drupal/Core/Field/FieldConfigInterface.php Adds constraints for a given field item property.
FieldConfigInterface::setConstraints function core/lib/Drupal/Core/Field/FieldConfigInterface.php Sets the array of validation constraints for the FieldItemList.
FieldConfigInterface::setPropertyConstraints function core/lib/Drupal/Core/Field/FieldConfigInterface.php Sets constraints for a given field item property.
FieldCrudTest::doFieldPropertyConstraintsTests function core/modules/field/tests/src/Kernel/FieldCrudTest.php Tests configurable field validation.
FieldCrudTest::testFieldPropertyConstraints function core/modules/field/tests/src/Kernel/FieldCrudTest.php Tests setting and adding property constraints to a configurable field.
FieldItemList::getConstraints function core/lib/Drupal/Core/Field/FieldItemList.php
FieldStorageConfig::getConstraints function core/modules/field/src/Entity/FieldStorageConfig.php
FieldStorageDefinitionInterface::getConstraints function core/lib/Drupal/Core/Field/FieldStorageDefinitionInterface.php Returns an array of validation constraints.
FieldValidationTest::testFieldConstraints function core/modules/field/tests/src/Kernel/FieldValidationTest.php Tests that constraints defined by the field type are validated.
InfoParserDynamic::isConstraintSatisfiedByPreviousVersion function core/lib/Drupal/Core/Extension/InfoParserDynamic.php Determines if a constraint is satisfied by earlier versions of Drupal 8.
IntegerItem::getConstraints function core/lib/Drupal/Core/Field/Plugin/Field/FieldType/IntegerItem.php
MediaKernelTestBase::$testConstraintsMediaType property core/modules/media/tests/src/Kernel/MediaKernelTestBase.php The test media type with constraints.
MediaSourceEntityConstraintsInterface interface core/modules/media/src/MediaSourceEntityConstraintsInterface.php Defines an interface for a media source with entity constraints.
MediaSourceEntityConstraintsInterface.php file core/modules/media/src/MediaSourceEntityConstraintsInterface.php
MediaSourceEntityConstraintsInterface::getEntityConstraints function core/modules/media/src/MediaSourceEntityConstraintsInterface.php Gets media source-specific validation constraints for a media item.
MediaSourceFieldConstraintsInterface interface core/modules/media/src/MediaSourceFieldConstraintsInterface.php Defines an interface for a media source with source field constraints.
MediaSourceFieldConstraintsInterface.php file core/modules/media/src/MediaSourceFieldConstraintsInterface.php
MediaSourceFieldConstraintsInterface::getSourceFieldConstraints function core/modules/media/src/MediaSourceFieldConstraintsInterface.php Gets media source-specific validation constraints for a source field.
MediaSourceTest::testConstraints function core/modules/media/tests/src/Kernel/MediaSourceTest.php Tests the media item constraints functionality.
NumberItemTest::testConstraints function core/modules/field/tests/src/Kernel/Number/NumberItemTest.php Tests constraints on numeric item fields.
NumericItemBase::getConstraints function core/lib/Drupal/Core/Field/Plugin/Field/FieldType/NumericItemBase.php
OEmbed::getSourceFieldConstraints function core/modules/media/src/Plugin/media/Source/OEmbed.php
PrecedingConstraintAwareValidatorTrait::getPrecedingConstraints function core/modules/ckeditor5/src/Plugin/Validation/Constraint/PrecedingConstraintAwareValidatorTrait.php Gets the constraints preceding the given constraint in the current context.
PrecedingConstraintAwareValidatorTrait::hasViolationsForPrecedingConstraints function core/modules/ckeditor5/src/Plugin/Validation/Constraint/PrecedingConstraintAwareValidatorTrait.php Checks whether any preceding constraints have been violated.
RecursiveContextualValidator::validateConstraints function core/lib/Drupal/Core/TypedData/Validation/RecursiveContextualValidator.php Validates a node's value against all constraints in the given group.
RecursiveContextualValidatorTest::testBasicValidateWithMultipleConstraints function core/tests/Drupal/Tests/Core/TypedData/RecursiveContextualValidatorTest.php @covers ::validate[[api-linebreak]]
RecursiveContextualValidatorTest::testBasicValidateWithoutConstraints function core/tests/Drupal/Tests/Core/TypedData/RecursiveContextualValidatorTest.php @covers ::validate[[api-linebreak]]
StringItem::getConstraints function core/lib/Drupal/Core/Field/Plugin/Field/FieldType/StringItem.php
TelephoneItem::getConstraints function core/modules/telephone/src/Plugin/Field/FieldType/TelephoneItem.php
TestItem::getConstraints function core/modules/field/tests/modules/field_test/src/Plugin/Field/FieldType/TestItem.php
TestWithConstraints class core/modules/media/tests/modules/media_test_source/src/Plugin/media/Source/TestWithConstraints.php Provides generic media type.
TestWithConstraints.php file core/modules/media/tests/modules/media_test_source/src/Plugin/media/Source/TestWithConstraints.php
TestWithConstraints::getEntityConstraints function core/modules/media/tests/modules/media_test_source/src/Plugin/media/Source/TestWithConstraints.php
TestWithConstraints::getSourceFieldConstraints function core/modules/media/tests/modules/media_test_source/src/Plugin/media/Source/TestWithConstraints.php
TextItem::getConstraints function core/modules/text/src/Plugin/Field/FieldType/TextItem.php
TextWithSummaryItem::getConstraints function core/modules/text/src/Plugin/Field/FieldType/TextWithSummaryItem.php
TypedData::getConstraints function core/lib/Drupal/Core/TypedData/TypedData.php
TypedDataInterface::getConstraints function core/lib/Drupal/Core/TypedData/TypedDataInterface.php Gets a list of validation constraints.
TypedDataManager::getDefaultConstraints function core/lib/Drupal/Core/TypedData/TypedDataManager.php
TypedDataManagerInterface::getDefaultConstraints function core/lib/Drupal/Core/TypedData/TypedDataManagerInterface.php Gets default constraints for the given data definition.
TypedDataMetadata::findConstraints function core/lib/Drupal/Core/TypedData/Validation/TypedDataMetadata.php
TypedDataMetadata::getConstraints function core/lib/Drupal/Core/TypedData/Validation/TypedDataMetadata.php

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