You are here

public static function BreakpointFormTrait::breakpointsFormValidate in Doubleclick for Publishers (DFP) 8

Validation function used by the breakpoints form.

File

src/Form/BreakpointFormTrait.php, line 48
Contains \Drupal\dfp\Form\BreakpointFormTrait.

Class

BreakpointFormTrait
Provides form for adding breakpoints to a DFP tag.

Namespace

Drupal\dfp\Form

Code

public static function breakpointsFormValidate(array &$element, FormStateInterface &$form_state) {
  if ($form_state
    ->getTriggeringElement()['#name'] != 'dfp_more_breakpoints') {
    self::breakpointsTrim($form_state
      ->getValues());
  }
}