Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
AFAICT, a contrainst I add to a bundle field definition with addConstraint() doesn't do anything.
I'm using this as part of a Commerce entity trait plugin, which could have something to do with it.
Comments
Comment #2
bojanz CreditAttribution: bojanz at Centarro commentedBeing discussed in the Commerce issue #2929160: constraints defined in fields defined in entity trait plugins don't work.
Right now it doesn't look like Entity API can do anything to avoid/fix this problem.