class RoleExistsConstraint

Checks if a role exists.

Attributes

#[Constraint(id: 'RoleExists', label: new TranslatableMarkup('Role exists', [], [ 'context' => 'Validation', ]))]

Hierarchy

  • class \Drupal\user\Plugin\Validation\Constraint\RoleExistsConstraint implements \Symfony\Component\Validator\Constraint

Expanded class hierarchy of RoleExistsConstraint

File

core/modules/user/src/Plugin/Validation/Constraint/RoleExistsConstraint.php, line 14

Namespace

Drupal\user\Plugin\Validation\Constraint
View source
class RoleExistsConstraint extends SymfonyConstraint {
  
  /**
   * The error message if validation fails.
   *
   * @var string
   */
  public $message = "The role with id '@rid' does not exist.";

}

Members

Title Sort descending Modifiers Object type Summary
RoleExistsConstraint::$message public property The error message if validation fails.

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