You are here

abstract protected function CvValidatorBase::getRules in Clientside Validation 8

Same name and namespace in other branches
  1. 8.2 src/CvValidatorBase.php \Drupal\clientside_validation\CvValidatorBase::getRules()
  2. 3.0.x src/CvValidatorBase.php \Drupal\clientside_validation\CvValidatorBase::getRules()
  3. 2.0.x src/CvValidatorBase.php \Drupal\clientside_validation\CvValidatorBase::getRules()

Get the validation rules for this form element.

Return value

array An array with following keys:

  • rules: An array with the rulename as key and the rule arguments as value.
  • messages: An array with the rulename as key and the message for this rule as argument.
1 call to CvValidatorBase::getRules()
CvValidatorBase::addValidation in src/CvValidatorBase.php
Makes the necessary changes to the form element so it can be validated.
10 methods override CvValidatorBase::getRules()
Email::getRules in src/Plugin/CvValidator/Email.php
Get the validation rules for this form element.
EqualTo::getRules in clientside_validation_jquery/src/Plugin/CvValidator/EqualTo.php
Get the validation rules for this form element.
Max::getRules in src/Plugin/CvValidator/Max.php
Get the validation rules for this form element.
MaxLength::getRules in src/Plugin/CvValidator/MaxLength.php
Get the validation rules for this form element.
Min::getRules in src/Plugin/CvValidator/Min.php
Get the validation rules for this form element.

... See full list

File

src/CvValidatorBase.php, line 36

Class

CvValidatorBase
Class CvValidatorBase.

Namespace

Drupal\clientside_validation

Code

protected abstract function getRules($element, FormStateInterface $form_state);