Search for Constraint

  1. Search 7.x for Constraint
  2. Search 9.5.x for Constraint
  3. Search 8.9.x for Constraint
  4. Search 11.x for Constraint
  5. Search main for Constraint
  6. Other projects

Exact matches

These are exact matches according to your search
Title Object type File name Summary
Constraint class core/lib/Drupal/Core/Validation/Attribute/Constraint.php Defines a Constraint attribute object.
Constraint class core/lib/Drupal/Core/Validation/Annotation/Constraint.php Defines a validation constraint annotation object.
Constraint class core/lib/Drupal/Component/Version/Constraint.php A value object representing a Drupal version constraint.

All search results

Title Object type File name Summary
UniqueValuesConstraintValidatorTest::testValidationReference function core/tests/Drupal/KernelTests/Core/Validation/UniqueValuesConstraintValidatorTest.php Tests the UniqueField validation constraint validator for entity reference fields.
unique_field_constraint_test.info.yml file core/modules/system/tests/modules/unique_field_constraint_test/unique_field_constraint_test.info.yml core/modules/system/tests/modules/unique_field_constraint_test/unique_field_constraint_test.info.yml
unique_field_constraint_test.module file core/modules/system/tests/modules/unique_field_constraint_test/unique_field_constraint_test.module Contains unique_field_constraint_test.module.
unique_field_constraint_test_entity_base_field_info_alter function core/modules/system/tests/modules/unique_field_constraint_test/unique_field_constraint_test.module Implements hook_entity_base_field_info_alter().
unique_field_constraint_test_query_entity_test_access_alter function core/modules/system/tests/modules/unique_field_constraint_test/unique_field_constraint_test.module Implements hook_query_entity_test_access_alter().
UploadedFileConstraint class core/modules/file/src/Validation/Constraint/UploadedFileConstraint.php A constraint for UploadedFile objects.
UploadedFileConstraint.php file core/modules/file/src/Validation/Constraint/UploadedFileConstraint.php
UploadedFileConstraint::$maxSize property core/modules/file/src/Validation/Constraint/UploadedFileConstraint.php The upload max size. Defaults to checking the environment.
UploadedFileConstraint::$uploadErrorMessage property core/modules/file/src/Validation/Constraint/UploadedFileConstraint.php The generic file upload error message.
UploadedFileConstraint::$uploadFormSizeErrorMessage property core/modules/file/src/Validation/Constraint/UploadedFileConstraint.php The upload form size error message.
UploadedFileConstraint::$uploadIniSizeErrorMessage property core/modules/file/src/Validation/Constraint/UploadedFileConstraint.php The upload ini size error message.
UploadedFileConstraint::$uploadNoFileErrorMessage property core/modules/file/src/Validation/Constraint/UploadedFileConstraint.php The upload no file error message.
UploadedFileConstraint::$uploadPartialErrorMessage property core/modules/file/src/Validation/Constraint/UploadedFileConstraint.php The upload partial error message.
UploadedFileConstraintValidator class core/modules/file/src/Validation/Constraint/UploadedFileConstraintValidator.php Constraint validator for uploaded files.
UploadedFileConstraintValidator.php file core/modules/file/src/Validation/Constraint/UploadedFileConstraintValidator.php
UploadedFileConstraintValidator::validate function core/modules/file/src/Validation/Constraint/UploadedFileConstraintValidator.php
UploadedFileConstraintValidatorTest class core/modules/file/tests/src/Kernel/Validation/UploadedFileConstraintValidatorTest.php Tests the uploaded file validator.
UploadedFileConstraintValidatorTest.php file core/modules/file/tests/src/Kernel/Validation/UploadedFileConstraintValidatorTest.php
UploadedFileConstraintValidatorTest::$filename property core/modules/file/tests/src/Kernel/Validation/UploadedFileConstraintValidatorTest.php The file name.
UploadedFileConstraintValidatorTest::$maxSize property core/modules/file/tests/src/Kernel/Validation/UploadedFileConstraintValidatorTest.php The max 4 MB filesize to use for testing.
UploadedFileConstraintValidatorTest::$modules property core/modules/file/tests/src/Kernel/Validation/UploadedFileConstraintValidatorTest.php Modules to install.
UploadedFileConstraintValidatorTest::$path property core/modules/file/tests/src/Kernel/Validation/UploadedFileConstraintValidatorTest.php The temporary file path.
UploadedFileConstraintValidatorTest::$validator property core/modules/file/tests/src/Kernel/Validation/UploadedFileConstraintValidatorTest.php A validator.
UploadedFileConstraintValidatorTest::setUp function core/modules/file/tests/src/Kernel/Validation/UploadedFileConstraintValidatorTest.php
UploadedFileConstraintValidatorTest::testValidateFail function core/modules/file/tests/src/Kernel/Validation/UploadedFileConstraintValidatorTest.php @covers ::validate[[api-linebreak]]
@dataProvider validateProvider
UploadedFileConstraintValidatorTest::testValidateSuccess function core/modules/file/tests/src/Kernel/Validation/UploadedFileConstraintValidatorTest.php @covers ::validate[[api-linebreak]]
UploadedFileConstraintValidatorTest::validateProvider function core/modules/file/tests/src/Kernel/Validation/UploadedFileConstraintValidatorTest.php Data provider for ::testValidateFail.
UserNameConstraint class core/modules/user/src/Plugin/Validation/Constraint/UserNameConstraint.php Checks if a value is a valid user name.
UserNameConstraint.php file core/modules/user/src/Plugin/Validation/Constraint/UserNameConstraint.php
UserNameConstraint::$emptyMessage property core/modules/user/src/Plugin/Validation/Constraint/UserNameConstraint.php
UserNameConstraint::$illegalMessage property core/modules/user/src/Plugin/Validation/Constraint/UserNameConstraint.php
UserNameConstraint::$multipleSpacesMessage property core/modules/user/src/Plugin/Validation/Constraint/UserNameConstraint.php
UserNameConstraint::$spaceBeginMessage property core/modules/user/src/Plugin/Validation/Constraint/UserNameConstraint.php
UserNameConstraint::$spaceEndMessage property core/modules/user/src/Plugin/Validation/Constraint/UserNameConstraint.php
UserNameConstraint::$tooLongMessage property core/modules/user/src/Plugin/Validation/Constraint/UserNameConstraint.php
UserNameConstraintValidator class core/modules/user/src/Plugin/Validation/Constraint/UserNameConstraintValidator.php Validates the UserName constraint.
UserNameConstraintValidator.php file core/modules/user/src/Plugin/Validation/Constraint/UserNameConstraintValidator.php
UserNameConstraintValidator::validate function core/modules/user/src/Plugin/Validation/Constraint/UserNameConstraintValidator.php
UuidConstraint class core/lib/Drupal/Core/Validation/Plugin/Validation/Constraint/UuidConstraint.php Validates a UUID.
UuidConstraint.php file core/lib/Drupal/Core/Validation/Plugin/Validation/Constraint/UuidConstraint.php
UuidConstraint::validatedBy function core/lib/Drupal/Core/Validation/Plugin/Validation/Constraint/UuidConstraint.php @todo Add method return type declaration.
validation.constraint service core/core.services.yml Drupal\Core\Validation\ConstraintManager
ValidKeysConstraint class core/lib/Drupal/Core/Validation/Plugin/Validation/Constraint/ValidKeysConstraint.php Checks that all the keys of a mapping are valid and required keys present.
ValidKeysConstraint.php file core/lib/Drupal/Core/Validation/Plugin/Validation/Constraint/ValidKeysConstraint.php
ValidKeysConstraint::$allowedKeys property core/lib/Drupal/Core/Validation/Plugin/Validation/Constraint/ValidKeysConstraint.php Keys which are allowed in the validated array, or `<infer>` to auto-detect.
ValidKeysConstraint::$dynamicInvalidKeyMessage property core/lib/Drupal/Core/Validation/Plugin/Validation/Constraint/ValidKeysConstraint.php The error message if a key is unknown for the resolved type.
ValidKeysConstraint::$dynamicMissingRequiredKeyMessage property core/lib/Drupal/Core/Validation/Plugin/Validation/Constraint/ValidKeysConstraint.php The error message if a dynamically required key is missing.
ValidKeysConstraint::$indexedArrayMessage property core/lib/Drupal/Core/Validation/Plugin/Validation/Constraint/ValidKeysConstraint.php The error message if the array being validated is a list.
ValidKeysConstraint::$invalidKeyMessage property core/lib/Drupal/Core/Validation/Plugin/Validation/Constraint/ValidKeysConstraint.php The error message if a key is invalid.
ValidKeysConstraint::$missingRequiredKeyMessage property core/lib/Drupal/Core/Validation/Plugin/Validation/Constraint/ValidKeysConstraint.php The error message if a key is missing.

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