You are here

UniqueNickname.php in Open Social 10.3.x

File

modules/social_features/social_profile/modules/social_profile_fields/src/Plugin/Validation/Constraint/UniqueNickname.php
View source
<?php

namespace Drupal\social_profile_fields\Plugin\Validation\Constraint;

use Symfony\Component\Validator\Constraint;

/**
 * Checks that the submitted value is a unique integer.
 *
 * @Constraint(
 *   id = "UniqueNickname",
 *   label = @Translation("Unique Nickname", context = "Validation"),
 *   type = "string"
 * )
 */
class UniqueNickname extends Constraint {

  /**
   * The message that will be shown if the value is not unique.
   *
   * @var string
   */
  public $notUnique = '%value is already taken.';

}

Classes

Namesort descending Description
UniqueNickname Checks that the submitted value is a unique integer.