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 extends \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\ConstraintView source
class RoleExistsConstraint extends SymfonyConstraint {
/**
* The error message if validation fails.
*
* @var string
*/
public $message = "The role with id '@rid' does not exist.";
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.