EntityTestCompositeConstraint.php in Drupal 10
File
core/modules/system/tests/modules/entity_test/src/Plugin/Validation/Constraint/EntityTestCompositeConstraint.php
View source
<?php
namespace Drupal\entity_test\Plugin\Validation\Constraint;
use Drupal\Core\Entity\Plugin\Validation\Constraint\CompositeConstraintBase;
class EntityTestCompositeConstraint extends CompositeConstraintBase {
public $message = 'Multiple fields are validated';
public function coversFields() {
return [
'name',
'type',
];
}
}