You are here

public static function ConvolveImageEffect::elementValidateNumber in Imagick 8

Parameters

$element:

\Drupal\Core\Form\FormStateInterface $form_state:

File

src/Plugin/ImageEffect/ConvolveImageEffect.php, line 120

Class

ConvolveImageEffect
Applies the convolve effect on an image resource.

Namespace

Drupal\imagick\Plugin\ImageEffect

Code

public static function elementValidateNumber($element, FormStateInterface &$form_state) {
  if (!is_numeric($element['#value'])) {
    $form_state
      ->setError($element, t('Matrix should only contains numeric values.'));
  }
}