public function FacebookAuthSettingsForm::validateForm in Social Auth Facebook 8
Same name and namespace in other branches
- 8.2 src/Form/FacebookAuthSettingsForm.php \Drupal\social_auth_facebook\Form\FacebookAuthSettingsForm::validateForm()
- 3.x src/Form/FacebookAuthSettingsForm.php \Drupal\social_auth_facebook\Form\FacebookAuthSettingsForm::validateForm()
File
- src/
Form/ FacebookAuthSettingsForm.php, line 140
Class
- FacebookAuthSettingsForm
- Settings form for Social Auth Facebook.
Namespace
Drupal\social_auth_facebook\FormCode
public function validateForm(array &$form, FormStateInterface $form_state) {
if (!preg_match('/^[2-9]\\.[0-9]{1,2}$/', $form_state
->getValue('graph_version'))) {
$form_state
->setErrorByName('graph_version', $this
->t('Invalid API version. The syntax for API version is for example <em>v2.8</em>'));
}
parent::validateForm($form, $form_state);
}