public function SettingsForm::validateForm in DrupalAuth for SimpleSAMLphp 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/ SettingsForm.php, line 67
Class
- SettingsForm
- Configure DrupalAuth for SimpleSAMLphp settings for this site.
Namespace
Drupal\drupalauth4ssp\FormCode
public function validateForm(array &$form, FormStateInterface $form_state) {
$returnTo = $form_state
->getValue('idp_logout_returnto');
try {
HTTP::checkURLAllowed($returnTo);
} catch (\Exception $exception) {
$form_state
->setErrorByName('idp_logout_returnto', $exception
->getMessage());
}
}