class CKEditor5ElementConstraint

Same name in other branches
  1. 9 core/modules/ckeditor5/src/Plugin/Validation/Constraint/CKEditor5ElementConstraint.php \Drupal\ckeditor5\Plugin\Validation\Constraint\CKEditor5ElementConstraint
  2. 11.x core/modules/ckeditor5/src/Plugin/Validation/Constraint/CKEditor5ElementConstraint.php \Drupal\ckeditor5\Plugin\Validation\Constraint\CKEditor5ElementConstraint

CKEditor 5 element.

Hierarchy

Expanded class hierarchy of CKEditor5ElementConstraint

File

core/modules/ckeditor5/src/Plugin/Validation/Constraint/CKEditor5ElementConstraint.php, line 14

Namespace

Drupal\ckeditor5\Plugin\Validation\Constraint
View source
class CKEditor5ElementConstraint extends SymfonyConstraint {
    
    /**
     * The default violation message.
     *
     * @var string
     */
    public $message = 'The following tag is not valid HTML: %provided_element.';
    
    /**
     * Violation message when a required attribute is missing.
     *
     * @var string
     */
    public $missingRequiredAttributeMessage = 'The following tag is missing the required attribute <code>@required_attribute_name</code>: <code>@provided_element</code>.';
    
    /**
     * Violation message when a required attribute does not allow enough values.
     *
     * @var string
     */
    public $requiredAttributeMinValuesMessage = 'The following tag does not have the minimum of @min_attribute_value_count allowed values for the required attribute <code>@required_attribute_name</code>: <code>@provided_element</code>.';
    
    /**
     * Validation constraint option to impose attributes to be specified.
     *
     * @var null|array
     */
    public $requiredAttributes = NULL;

}

Members

Title Sort descending Modifiers Object type Summary
CKEditor5ElementConstraint::$message public property The default violation message.
CKEditor5ElementConstraint::$missingRequiredAttributeMessage public property Violation message when a required attribute is missing.
CKEditor5ElementConstraint::$requiredAttributeMinValuesMessage public property Violation message when a required attribute does not allow enough values.
CKEditor5ElementConstraint::$requiredAttributes public property Validation constraint option to impose attributes to be specified.

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.