You are here

public static function FapiValidationService::validate in Form API Validation 8.2

Perform FAPI Validation rules.

Parameters

array &$element: Forme Element.

\Drupal\Core\Form\FormStateInterface &$form_state: Form State.

File

src/FapiValidationService.php, line 61

Class

FapiValidationService
FapiValidationService.

Namespace

Drupal\fapi_validation

Code

public static function validate(array &$element, FormStateInterface &$form_state) {
  $manager = \Drupal::service('plugin.manager.fapi_validation_validators');
  $manager
    ->validate($element, $form_state);
}