ProtectedUserFieldConstraint.php

Same filename in other branches
  1. 9 core/modules/user/src/Plugin/Validation/Constraint/ProtectedUserFieldConstraint.php
  2. 10 core/modules/user/src/Plugin/Validation/Constraint/ProtectedUserFieldConstraint.php
  3. 11.x core/modules/user/src/Plugin/Validation/Constraint/ProtectedUserFieldConstraint.php

Namespace

Drupal\user\Plugin\Validation\Constraint

File

core/modules/user/src/Plugin/Validation/Constraint/ProtectedUserFieldConstraint.php

View source
<?php

namespace Drupal\user\Plugin\Validation\Constraint;

use Symfony\Component\Validator\Constraint;

/**
 * Checks if the plain text password is provided for editing a protected field.
 *
 * @Constraint(
 *   id = "ProtectedUserField",
 *   label = @Translation("Password required for protected field change", context = "Validation")
 * )
 */
class ProtectedUserFieldConstraint extends Constraint {
    
    /**
     * Violation message.
     *
     * @var string
     */
    public $message = "Your current password is missing or incorrect; it's required to change the %name.";

}

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.