class ProtectedUserFieldConstraint in Drupal 8
Same name and namespace in other branches
- 9 core/modules/user/src/Plugin/Validation/Constraint/ProtectedUserFieldConstraint.php \Drupal\user\Plugin\Validation\Constraint\ProtectedUserFieldConstraint
Checks if the plain text password is provided for editing a protected field.
Plugin annotation
@Constraint(
id = "ProtectedUserField",
label = @Translation("Password required for protected field change", context = "Validation")
)
Hierarchy
- class \Drupal\user\Plugin\Validation\Constraint\ProtectedUserFieldConstraint extends \Symfony\Component\Validator\Constraint
Expanded class hierarchy of ProtectedUserFieldConstraint
1 file declares its use of ProtectedUserFieldConstraint
- ProtectedUserFieldConstraintValidatorTest.php in core/
modules/ user/ tests/ src/ Unit/ Plugin/ Validation/ Constraint/ ProtectedUserFieldConstraintValidatorTest.php
File
- core/
modules/ user/ src/ Plugin/ Validation/ Constraint/ ProtectedUserFieldConstraint.php, line 15
Namespace
Drupal\user\Plugin\Validation\ConstraintView source
class ProtectedUserFieldConstraint extends Constraint {
/**
* Violation message.
*
* @var string
*/
public $message = "Your current password is missing or incorrect; it's required to change the %name.";
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
ProtectedUserFieldConstraint:: |
public | property | Violation message. |