60 classes are annotated with Constraint
- AllowedValuesConstraint in core/
lib/ Drupal/ Core/ Validation/ Plugin/ Validation/ Constraint/ AllowedValuesConstraint.php - Checks for the value being allowed.
- BlockContentEntityChangedConstraint in core/
modules/ block_content/ src/ Plugin/ Validation/ Constraint/ BlockContentEntityChangedConstraint.php - Validation constraint for the block content entity changed timestamp.
- BookOutlineConstraint in core/
modules/ book/ src/ Plugin/ Validation/ Constraint/ BookOutlineConstraint.php - Validation constraint for changing the book outline in pending revisions.
- BundleConstraint in core/
lib/ Drupal/ Core/ Entity/ Plugin/ Validation/ Constraint/ BundleConstraint.php - Checks if a value is a valid entity type.
- CKEditor5ElementConstraint in core/
modules/ ckeditor5/ src/ Plugin/ Validation/ Constraint/ CKEditor5ElementConstraint.php - CKEditor 5 element.
- CommentNameConstraint in core/
modules/ comment/ src/ Plugin/ Validation/ Constraint/ CommentNameConstraint.php - Supports validating comment author names.
- ComplexDataConstraint in core/
lib/ Drupal/ Core/ Validation/ Plugin/ Validation/ Constraint/ ComplexDataConstraint.php - Complex data constraint.
- ContentTranslationSynchronizedFieldsConstraint in core/
modules/ content_translation/ src/ Plugin/ Validation/ Constraint/ ContentTranslationSynchronizedFieldsConstraint.php - Validation constraint for the entity changed timestamp.
- CountConstraint in core/
lib/ Drupal/ Core/ Validation/ Plugin/ Validation/ Constraint/ CountConstraint.php - Count constraint.
- DateTimeFormatConstraint in core/
modules/ datetime/ src/ Plugin/ Validation/ Constraint/ DateTimeFormatConstraint.php - Validation constraint for DateTime items to ensure the format is correct.
- DeletedWorkspaceConstraint in core/
modules/ workspaces/ src/ Plugin/ Validation/ Constraint/ DeletedWorkspaceConstraint.php - Deleted workspace constraint.
- EmailConstraint in core/
lib/ Drupal/ Core/ Validation/ Plugin/ Validation/ Constraint/ EmailConstraint.php - Count constraint.
- EntityChangedConstraint in core/
lib/ Drupal/ Core/ Entity/ Plugin/ Validation/ Constraint/ EntityChangedConstraint.php - Validation constraint for the entity changed timestamp.
- EntityHasFieldConstraint in core/
lib/ Drupal/ Core/ Entity/ Plugin/ Validation/ Constraint/ EntityHasFieldConstraint.php - Checks if a value is an entity that has a specific field.
- EntityReferenceSupportedNewEntitiesConstraint in core/
modules/ workspaces/ src/ Plugin/ Validation/ Constraint/ EntityReferenceSupportedNewEntitiesConstraint.php - The entity reference supported new entities constraint.
- EntityTestCompositeConstraint in core/
modules/ system/ tests/ modules/ entity_test/ src/ Plugin/ Validation/ Constraint/ EntityTestCompositeConstraint.php - Constraint with multiple fields.
- EntityTestContainerFactoryPlugin in core/
modules/ system/ tests/ modules/ entity_test/ src/ Plugin/ Validation/ Constraint/ EntityTestContainerFactoryPlugin.php - A dummy constraint for testing \Drupal\Core\Validation\ConstraintFactory.
- EntityTestDefaultPlugin in core/
modules/ system/ tests/ modules/ entity_test/ src/ Plugin/ Validation/ Constraint/ EntityTestDefaultPlugin.php - A dummy constraint for testing \Drupal\Core\Validation\ConstraintFactory.
- EntityTestEntityLevel in core/
modules/ system/ tests/ modules/ entity_test/ src/ Plugin/ Validation/ Constraint/ EntityTestEntityLevel.php - Constraint on entity level.
- EntityTypeConstraint in core/
lib/ Drupal/ Core/ Entity/ Plugin/ Validation/ Constraint/ EntityTypeConstraint.php - Checks if a value is a valid entity type.
- EntityUntranslatableFieldsConstraint in core/
lib/ Drupal/ Core/ Entity/ Plugin/ Validation/ Constraint/ EntityUntranslatableFieldsConstraint.php - Validation constraint for the entity changed timestamp.
- EntityWorkspaceConflictConstraint in core/
modules/ workspaces/ src/ Plugin/ Validation/ Constraint/ EntityWorkspaceConflictConstraint.php - Validation constraint for an entity being edited in multiple workspaces.
- FeedTitleConstraint in core/
modules/ aggregator/ src/ Plugin/ Validation/ Constraint/ FeedTitleConstraint.php - Supports validating feed titles.
- FeedUrlConstraint in core/
modules/ aggregator/ src/ Plugin/ Validation/ Constraint/ FeedUrlConstraint.php - Supports validating feed URLs.
- FieldWidgetConstraint in core/
modules/ system/ tests/ modules/ entity_test/ src/ Plugin/ Validation/ Constraint/ FieldWidgetConstraint.php - Supports validating widget constraints.
- FileUriUnique in core/
modules/ file/ src/ Plugin/ Validation/ Constraint/ FileUriUnique.php - Supports validating file URIs.
- FileValidationConstraint in core/
modules/ file/ src/ Plugin/ Validation/ Constraint/ FileValidationConstraint.php - Validation File constraint.
- ForumLeafConstraint in core/
modules/ forum/ src/ Plugin/ Validation/ Constraint/ ForumLeafConstraint.php - Checks that the node is assigned only a "leaf" term in the forum taxonomy.
- IsNullConstraint in core/
lib/ Drupal/ Core/ Validation/ Plugin/ Validation/ Constraint/ IsNullConstraint.php - Null constraint.
- LengthConstraint in core/
lib/ Drupal/ Core/ Validation/ Plugin/ Validation/ Constraint/ LengthConstraint.php - Length constraint.
- LinkAccessConstraint in core/
modules/ link/ src/ Plugin/ Validation/ Constraint/ LinkAccessConstraint.php - Defines an access validation constraint for links.
- LinkExternalProtocolsConstraint in core/
modules/ link/ src/ Plugin/ Validation/ Constraint/ LinkExternalProtocolsConstraint.php - Defines a protocol validation constraint for links to external URLs.
- LinkNotExistingInternalConstraint in core/
modules/ link/ src/ Plugin/ Validation/ Constraint/ LinkNotExistingInternalConstraint.php - Defines a protocol validation constraint for links to broken internal URLs.
- LinkTypeConstraint in core/
modules/ link/ src/ Plugin/ Validation/ Constraint/ LinkTypeConstraint.php - Validation constraint for links receiving data allowed by its settings.
- MediaTestConstraint in core/
modules/ media/ tests/ modules/ media_test_source/ src/ Plugin/ Validation/ Constraint/ MediaTestConstraint.php - A media test constraint.
- MenuSettingsConstraint in core/
modules/ menu_ui/ src/ Plugin/ Validation/ Constraint/ MenuSettingsConstraint.php - Validation constraint for changing the menu settings in pending revisions.
- MenuTreeHierarchyConstraint in core/
modules/ menu_link_content/ src/ Plugin/ Validation/ Constraint/ MenuTreeHierarchyConstraint.php - Validation constraint for changing the menu hierarchy in pending revisions.
- ModerationStateConstraint in core/
modules/ content_moderation/ src/ Plugin/ Validation/ Constraint/ ModerationStateConstraint.php - Verifies that nodes have a valid moderation state.
- NotNullConstraint in core/
lib/ Drupal/ Core/ Validation/ Plugin/ Validation/ Constraint/ NotNullConstraint.php - NotNull constraint.
- OEmbedResourceConstraint in core/
modules/ media/ src/ Plugin/ Validation/ Constraint/ OEmbedResourceConstraint.php - Checks if a value represents a valid oEmbed resource URL.
- PathAliasConstraint in core/
modules/ path/ src/ Plugin/ Validation/ Constraint/ PathAliasConstraint.php - Validation constraint for changing path aliases in pending revisions.
- PrimitiveTypeConstraint in core/
lib/ Drupal/ Core/ Validation/ Plugin/ Validation/ Constraint/ PrimitiveTypeConstraint.php - Supports validating all primitive types.
- ProtectedUserFieldConstraint in core/
modules/ user/ src/ Plugin/ Validation/ Constraint/ ProtectedUserFieldConstraint.php - Checks if the plain text password is provided for editing a protected field.
- RangeConstraint in core/
lib/ Drupal/ Core/ Validation/ Plugin/ Validation/ Constraint/ RangeConstraint.php - Range constraint.
- ReferenceAccessConstraint in core/
lib/ Drupal/ Core/ Entity/ Plugin/ Validation/ Constraint/ ReferenceAccessConstraint.php - Entity Reference valid reference constraint.
- RegexConstraint in core/
lib/ Drupal/ Core/ Validation/ Plugin/ Validation/ Constraint/ RegexConstraint.php - Regex constraint.
- RestTestConstraint in core/
modules/ rest/ tests/ modules/ rest_test/ src/ Plugin/ Validation/ Constraint/ RestTestConstraint.php - Adds some validations for a REST test field.
- TaxonomyTermHierarchyConstraint in core/
modules/ taxonomy/ src/ Plugin/ Validation/ Constraint/ TaxonomyTermHierarchyConstraint.php - Validation constraint for changing the term hierarchy in pending revisions.
- TestFieldConstraint in core/
modules/ field/ tests/ modules/ field_test/ src/ Plugin/ Validation/ Constraint/ TestFieldConstraint.php - Checks if a value is not equal.
- TestValidatedReferenceConstraint in core/
modules/ system/ tests/ modules/ entity_test/ src/ Plugin/ Validation/ Constraint/ TestValidatedReferenceConstraint.php - Validates referenced entities.
- ToolbarItemConstraint in core/
modules/ ckeditor5/ src/ Plugin/ Validation/ Constraint/ ToolbarItemConstraint.php - A CKEditor 5 toolbar item.
- UniqueFieldConstraint in core/
lib/ Drupal/ Core/ Validation/ Plugin/ Validation/ Constraint/ UniqueFieldConstraint.php - Checks if an entity field has a unique value.
- UniquePathAliasConstraint in core/
lib/ Drupal/ Core/ Path/ Plugin/ Validation/ Constraint/ UniquePathAliasConstraint.php - Validation constraint for unique path alias values.
- UserMailRequired in core/
modules/ user/ src/ Plugin/ Validation/ Constraint/ UserMailRequired.php - Checks if the user's email address is provided if required.
- UserMailUnique in core/
modules/ user/ src/ Plugin/ Validation/ Constraint/ UserMailUnique.php - Checks if a user's email address is unique on the site.
- UserNameConstraint in core/
modules/ user/ src/ Plugin/ Validation/ Constraint/ UserNameConstraint.php - Checks if a value is a valid user name.
- UserNameUnique in core/
modules/ user/ src/ Plugin/ Validation/ Constraint/ UserNameUnique.php - Checks if a user name is unique on the site.
- UuidConstraint in core/
lib/ Drupal/ Core/ Validation/ Plugin/ Validation/ Constraint/ UuidConstraint.php - Validates a UUID.
- ValidPathConstraint in core/
lib/ Drupal/ Core/ Path/ Plugin/ Validation/ Constraint/ ValidPathConstraint.php - Validation constraint for valid system paths.
- ValidReferenceConstraint in core/
lib/ Drupal/ Core/ Entity/ Plugin/ Validation/ Constraint/ ValidReferenceConstraint.php - Entity Reference valid reference constraint.
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.