ImageStyleEditForm::effectValidate

public ImageStyleEditForm::effectValidate($form, FormStateInterface $form_state)

Validate handler for image effect.

File

core/modules/image/src/Form/ImageStyleEditForm.php, line 195

Class

ImageStyleEditForm
Controller for image style edit form.

Namespace

Drupal\image\Form

Code

public function effectValidate($form, FormStateInterface $form_state) {
  if (!$form_state->getValue('new')) {
    $form_state->setErrorByName('new', $this->t('Select an effect to add.'));
  }
}
doc_Drupal
2016-10-29 09:19:45
Comments
Leave a Comment

Please login to continue.