You are here

function imagecache_actions_validate_number in ImageCache Actions 7

Same name and namespace in other branches
  1. 8 utility-form.inc \imagecache_actions_validate_number()
  2. 6.2 utility-form.inc \imagecache_actions_validate_number()
  3. 6 utility.inc \imagecache_actions_validate_number()

Form element validator that checks for a valid number.

Parameters

array $element:

$form_state:

1 string reference to 'imagecache_actions_validate_number'
imagecache_actions_pos_form in ./utility-form.inc
Prepares a sub form for displaying positioning fields.

File

./utility-form.inc, line 51
Utility form, conversion and rendering functions for image processes.

Code

function imagecache_actions_validate_number(&$element, &$form_state) {
  if (empty($element['#value'])) {
    form_set_value($element, 0, $form_state);
  }
}