public function ImageStyleEditForm::effectValidate in Zircon Profile 8
Same name and namespace in other branches
- 8.0 core/modules/image/src/Form/ImageStyleEditForm.php \Drupal\image\Form\ImageStyleEditForm::effectValidate()
Validate handler for image effect.
File
- core/
modules/ image/ src/ Form/ ImageStyleEditForm.php, line 200 - Contains \Drupal\image\Form\ImageStyleEditForm.
Class
- ImageStyleEditForm
- Controller for image style edit form.
Namespace
Drupal\image\FormCode
public function effectValidate($form, FormStateInterface $form_state) {
if (!$form_state
->getValue('new')) {
$form_state
->setErrorByName('new', $this
->t('Select an effect to add.'));
}
}