Same name and namespace in other branches
  1. 8.x-2.x src/Form/ExifSettingsForm.php \Drupal\exif\Form\ExifSettingsForm::validateForm() 1 comment

File

src/Controller/ExifSettingsForm.php, line 227

Class

ExifSettingsForm
Manage Settings forms.

Namespace

Drupal\exif\Controller

Code

public function validateForm(array &$form, FormStateInterface $form_state) {
    if ($form_state->getValue('extraction_solution') == 'simple_exiftool' && !is_executable($form_state->getValue('exiftool_location'))) {
        $form_state->setErrorByName('exiftool_location', $this->t('The location provided for exiftool is not correct. Please ensure the exiftool location exists and is executable.'));
    }
    parent::validateForm($form, $form_state);
}