t('Mimetype to convert to (e.g. video/mp4, video/quicktime, etc...)'); $form['args']['#description'] = $this->t('Additional command line parameters for FFMpeg'); return $form; } /** * {@inheritdoc} */ public function validateConfigurationForm(array &$form, FormStateInterface $form_state) { parent::validateConfigurationForm($form, $form_state); $exploded_mime = explode('/', $form_state->getValue('mimetype')); if ($exploded_mime[0] != 'video') { $form_state->setErrorByName( 'mimetype', $this->t('Please enter a video mimetype (e.g. video/mp4, video/quicktime, etc...)') ); } } }