public function RestUIForm::validateForm in REST UI 8
Overrides FormBase::validateForm
See also
\Drupal\rest\Routing\ResourceRoutes::alterRoutes()
File
- src/
Form/ RestUIForm.php, line 351
Class
- RestUIForm
- Provides a REST resource configuration form.
Namespace
Drupal\restui\FormCode
public function validateForm(array &$form, FormStateInterface $form_state) {
if ($form_state
->getValue('granularity') === RestResourceConfigInterface::RESOURCE_GRANULARITY) {
$this
->validateFormValuesForResourceGranularity($form_state);
}
else {
$this
->validateFormValuesForMethodGranularity($form_state);
}
}