You are here

interface CvValidatorInterface in Clientside Validation 8.2

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

Defines an interface for ice cream flavor plugins.

Hierarchy

Expanded class hierarchy of CvValidatorInterface

All classes that implement CvValidatorInterface

File

src/CvValidatorInterface.php, line 11

Namespace

Drupal\clientside_validation
View source
interface CvValidatorInterface extends PluginInspectionInterface {

  /**
   * Makes the necessary changes to the form element so it can be validated.
   *
   * @param array $element
   *   The form element to validate.
   * @param \Drupal\Core\Form\FormStateInterface $form_state
   *   The form state of the form this element belongs to.
   */
  public function addValidation(array &$element, FormStateInterface $form_state);

  /**
   * Return the name of the validator flavor.
   *
   * @return string
   *   The name of the validator.
   */
  public function getName();

}

Members

Namesort descending Modifiers Type Description Overrides
CvValidatorInterface::addValidation public function Makes the necessary changes to the form element so it can be validated. 1
CvValidatorInterface::getName public function Return the name of the validator flavor. 1
PluginInspectionInterface::getPluginDefinition public function Gets the definition of the plugin implementation. 4
PluginInspectionInterface::getPluginId public function Gets the plugin_id of the plugin instance. 2