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
- class \Drupal\Component\Annotation\Plugin implements AnnotationInterface
- class \Drupal\field_validation\Annotation\FieldValidationRule
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
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.
File
- src/
Annotation/ FieldValidationRule.php, line 25
Namespace
Drupal\field_validation\AnnotationView 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
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
FieldValidationRule:: |
public | property | A brief description of the field validation rule. | |
FieldValidationRule:: |
public | property | The plugin ID. | |
FieldValidationRule:: |
public | property | The human-readable name of the field validation rule. | |
Plugin:: |
protected | property | The plugin definition read from the class annotation. | 1 |
Plugin:: |
public | function |
Gets the value of an annotation. Overrides AnnotationInterface:: |
5 |
Plugin:: |
public | function |
Gets the class of the annotated class. Overrides AnnotationInterface:: |
|
Plugin:: |
public | function |
Gets the unique ID for this annotated class. Overrides AnnotationInterface:: |
|
Plugin:: |
public | function |
Gets the name of the provider of the annotated class. Overrides AnnotationInterface:: |
|
Plugin:: |
protected | function | Parses an annotation into its definition. | |
Plugin:: |
public | function |
Sets the class of the annotated class. Overrides AnnotationInterface:: |
|
Plugin:: |
public | function |
Sets the name of the provider of the annotated class. Overrides AnnotationInterface:: |
|
Plugin:: |
public | function | Constructs a Plugin object. | 2 |