ProtectedUserFieldConstraint.php
Same filename and directory in other branches
- 11.x core/modules/user/src/Plugin/Validation/Constraint/ProtectedUserFieldConstraint.php
- 10 core/modules/user/src/Plugin/Validation/Constraint/ProtectedUserFieldConstraint.php
- 9 core/modules/user/src/Plugin/Validation/Constraint/ProtectedUserFieldConstraint.php
- 8.9.x core/modules/user/src/Plugin/Validation/Constraint/ProtectedUserFieldConstraint.php
Namespace
Drupal\user\Plugin\Validation\ConstraintFile
-
core/
modules/ user/ src/ Plugin/ Validation/ Constraint/ ProtectedUserFieldConstraint.php
View source
<?php
namespace Drupal\user\Plugin\Validation\Constraint;
use Drupal\Core\StringTranslation\TranslatableMarkup;
use Drupal\Core\Validation\Attribute\Constraint;
use Symfony\Component\Validator\Attribute\HasNamedArguments;
use Symfony\Component\Validator\Constraint as SymfonyConstraint;
/**
* Checks if the plain text password is provided for editing a protected field.
*/
class ProtectedUserFieldConstraint extends SymfonyConstraint {
public function __construct(mixed $options = NULL, public $message = "Your current password is missing or incorrect; it's required to change the %name.", ?array $groups = NULL, mixed $payload = NULL) {
parent::__construct($options, $groups, $payload);
}
}
Classes
| Title | Deprecated | Summary |
|---|---|---|
| ProtectedUserFieldConstraint | Checks if the plain text password is provided for editing a protected field. |
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.