You are here

class FieldValidationRule in Field Validation 8

Defines a field validation rule annotation object.

Plugin Namespace: Plugin\FieldValidationRule

For a working example, see \Drupal\field_validation\Plugin\FieldValidationRule\LengthFieldValidationRule

Hierarchy

Expanded class hierarchy of FieldValidationRule

See also

hook_field_validation_rule_info_alter()

\Drupal\field_validation\ConfigurableFieldValidationRuleInterface

\Drupal\field_validation\ConfigurableFieldValidationRuleBase

\Drupal\field_validation\FieldValidationRuleInterface

\Drupal\field_validation\FieldValidationRuleBase

\Drupal\field_validation\FieldValidationRuleManager

Plugin API

14 classes are annotated with FieldValidationRule
BlacklistFieldValidationRule in src/Plugin/FieldValidationRule/BlacklistFieldValidationRule.php
BlacklistFieldValidationRule.
DateRangeFieldValidationRule in src/Plugin/FieldValidationRule/DateRangeFieldValidationRule.php
DateRangeFieldValidationRule.
EmailFieldValidationRule in src/Plugin/FieldValidationRule/EmailFieldValidationRule.php
EmailFieldValidationRule.
IntegerFieldValidationRule in src/Plugin/FieldValidationRule/IntegerFieldValidationRule.php
IntegerFieldValidationRule.
IpFieldValidationRule in src/Plugin/FieldValidationRule/IpFieldValidationRule.php
IpFieldValidationRule.

... See full list

File

src/Annotation/FieldValidationRule.php, line 25

Namespace

Drupal\field_validation\Annotation
View source
class FieldValidationRule extends Plugin {

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

  /**
   * The human-readable name of the field validation rule.
   *
   * @ingroup plugin_translatable
   *
   * @var \Drupal\Core\Annotation\Translation
   */
  public $label;

  /**
   * A brief description of the field validation rule.
   *
   * This will be shown when adding or configuring this field validation rule.
   *
   * @ingroup plugin_translatable
   *
   * @var \Drupal\Core\Annotation\Translation (optional)
   */
  public $description = '';

}

Members

Namesort descending Modifiers Type Description Overrides
FieldValidationRule::$description public property A brief description of the field validation rule.
FieldValidationRule::$id public property The plugin ID.
FieldValidationRule::$label public property The human-readable name of the field validation rule.
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