public function OAuthSettingsForm::validateForm in OAuth 1.0 8
Same name and namespace in other branches
- 8.2 src/Form/OAuthSettingsForm.php \Drupal\oauth\Form\OAuthSettingsForm::validateForm()
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/ OAuthSettingsForm.php, line 85 - Contains \Drupal\oauth\Form\OAuthSettingsForm.
Class
- OAuthSettingsForm
- Provides a deletion confirmation form for the block instance deletion form.
Namespace
Drupal\oauth\FormCode
public function validateForm(array &$form, FormStateInterface $form_state) {
parent::validateForm($form, $form_state);
if (!intval($form_state
->getValue('request_token_lifetime', 10))) {
$form_state
->setErrorByName('oauth_request_token_lifetime', $this
->t('The request token lifetime must be a non-zero integer value.'));
}
}