public function ProviderForm::validateForm in oEmbed 8
Form validation handler.
Parameters
array $form: An associative array containing the structure of the form.
\Drupal\Core\Form\FormStateInterface $form_state: The current state of the form.
Overrides FormBase::validateForm
File
- src/
Form/ ProviderForm.php, line 71 - Contains \Drupal\oembed\Form\ProviderForm.
Class
- ProviderForm
- Class ProviderForm.
Namespace
Drupal\oembed\FormCode
public function validateForm(array &$form, FormStateInterface $form_state) {
parent::validateForm($form, $form_state);
// Validate each scheme.
$schemes = array_filter(array_map('trim', explode(PHP_EOL, $form_state
->getValue('scheme'))));
$form_state
->setValue('scheme', $schemes);
}