You are here

function entity_test_form_entity_test_form_validate_check in Drupal 10

Same name and namespace in other branches
  1. 8 core/modules/system/tests/modules/entity_test/entity_test.module \entity_test_form_entity_test_form_validate_check()
  2. 9 core/modules/system/tests/modules/entity_test/entity_test.module \entity_test_form_entity_test_form_validate_check()

Validation handler for the entity_test entity form.

1 string reference to 'entity_test_form_entity_test_form_validate_check'
entity_test_form_entity_test_form_alter in core/modules/system/tests/modules/entity_test/entity_test.module
Implements hook_form_BASE_FORM_ID_alter().

File

core/modules/system/tests/modules/entity_test/entity_test.module, line 348
Test module for the entity API providing several entity types for testing.

Code

function entity_test_form_entity_test_form_validate_check(array &$form, FormStateInterface $form_state) {
  if (!empty($form['#entity_test_form_validate'])) {
    \Drupal::state()
      ->set('entity_test.form.validate.result', TRUE);
  }
}