EntityUntranslatableFieldsConstraint.php 657 B

123456789101112131415161718192021
  1. <?php
  2. namespace Drupal\Core\Entity\Plugin\Validation\Constraint;
  3. use Symfony\Component\Validator\Constraint;
  4. /**
  5. * Validation constraint for the entity changed timestamp.
  6. *
  7. * @Constraint(
  8. * id = "EntityUntranslatableFields",
  9. * label = @Translation("Entity untranslatable fields", context = "Validation"),
  10. * type = {"entity"}
  11. * )
  12. */
  13. class EntityUntranslatableFieldsConstraint extends Constraint {
  14. public $defaultRevisionMessage = 'Non-translatable fields can only be changed when updating the current revision.';
  15. public $defaultTranslationMessage = 'Non-translatable fields can only be changed when updating the original language.';
  16. }