public function ImageAPIOptimizePipelineEditForm::processorValidate in Image Optimize (or ImageAPI Optimize) 4.x
Same name and namespace in other branches
- 8.3 src/Form/ImageAPIOptimizePipelineEditForm.php \Drupal\imageapi_optimize\Form\ImageAPIOptimizePipelineEditForm::processorValidate()
- 8.2 src/Form/ImageAPIOptimizePipelineEditForm.php \Drupal\imageapi_optimize\Form\ImageAPIOptimizePipelineEditForm::processorValidate()
Validate handler for image optimize processor.
File
- src/
Form/ ImageAPIOptimizePipelineEditForm.php, line 185
Class
- ImageAPIOptimizePipelineEditForm
- Controller for image optimize pipeline edit form.
Namespace
Drupal\imageapi_optimize\FormCode
public function processorValidate($form, FormStateInterface $form_state) {
if (!$form_state
->getValue('new')) {
$form_state
->setErrorByName('new', $this
->t('Select a processor to add.'));
}
}