You are here

function coloractions_validate_form in ImageCache Actions 8

Same name and namespace in other branches
  1. 7 coloractions/imagecache_coloractions.module \coloractions_validate_form()

Form element validation handler that compares low and high values.

1 string reference to 'coloractions_validate_form'
coloractions_adjustlevels_form in coloractions/imagecache_coloractions.module
Image effect form callback for the brightness effect.

File

coloractions/imagecache_coloractions.module, line 954

Code

function coloractions_validate_form($element) {
  $independent_colors = !empty($element['independent_colors']['#value']);
  if (!$independent_colors) {

    // Compare low and high.
    coloractions_validate_low_and_high($element, 'all_colors', '');
  }
  else {

    // Compare low and high per color
    coloractions_validate_low_and_high($element, 'per_color', '_red');
    coloractions_validate_low_and_high($element, 'per_color', '_green');
    coloractions_validate_low_and_high($element, 'per_color', '_blue');
  }
}