You are here

class CvValidator in Clientside Validation 8

Same name and namespace in other branches
  1. 8.2 src/Annotation/CvValidator.php \Drupal\clientside_validation\Annotation\CvValidator
  2. 3.0.x src/Annotation/CvValidator.php \Drupal\clientside_validation\Annotation\CvValidator
  3. 2.0.x src/Annotation/CvValidator.php \Drupal\clientside_validation\Annotation\CvValidator

Defines a clientside validation validator.

Plugin Namespace: Plugin\clientside_validation\CvValidator.

Hierarchy

Expanded class hierarchy of CvValidator

See also

\Drupal\clientside_validation\ValidatorManager

Plugin API

10 classes are annotated with CvValidator
Email in src/Plugin/CvValidator/Email.php
Provides a 'email' validator.
EqualTo in clientside_validation_jquery/src/Plugin/CvValidator/EqualTo.php
Provides a 'equalTo' validator.
Max in src/Plugin/CvValidator/Max.php
Provides a 'max' validator.
MaxLength in src/Plugin/CvValidator/MaxLength.php
Provides a 'maxlength' validator.
Min in src/Plugin/CvValidator/Min.php
Provides a 'min' validator.

... See full list

File

src/Annotation/CvValidator.php, line 17

Namespace

Drupal\clientside_validation\Annotation
View source
class CvValidator extends Plugin {

  /**
   * The plugin ID.
   *
   * @var string
   */
  public $id;

  /**
   * The name of the validator.
   *
   * @var \Drupal\Core\Annotation\Translation
   *
   * @ingroup plugin_translatable
   */
  public $name;

  /**
   * An array with keys 'types' and 'attributes'.
   *
   * Each value is an array of types and attributes (respectively) this plugin
   * supports.
   *
   * @var array
   */
  public $supports = [
    'types' => [],
    'attributes' => [],
  ];

  /**
   * An array of assets that can be #attached to a form element.
   *
   * @var array
   */
  public $attachments = [];

}

Members

Namesort descending Modifiers Type Description Overrides
CvValidator::$attachments public property An array of assets that can be #attached to a form element.
CvValidator::$id public property The plugin ID.
CvValidator::$name public property The name of the validator.
CvValidator::$supports public property An array with keys 'types' and 'attributes'.
Plugin::$definition protected property The plugin definition read from the class annotation. 1
Plugin::get public function Gets the value of an annotation. Overrides AnnotationInterface::get 5
Plugin::getClass public function Gets the class of the annotated class. Overrides AnnotationInterface::getClass
Plugin::getId public function Gets the unique ID for this annotated class. Overrides AnnotationInterface::getId
Plugin::getProvider public function Gets the name of the provider of the annotated class. Overrides AnnotationInterface::getProvider
Plugin::parse protected function Parses an annotation into its definition.
Plugin::setClass public function Sets the class of the annotated class. Overrides AnnotationInterface::setClass
Plugin::setProvider public function Sets the name of the provider of the annotated class. Overrides AnnotationInterface::setProvider
Plugin::__construct public function Constructs a Plugin object. 2