function imagecache_actions_validate_alpha in ImageCache Actions 8
Same name and namespace in other branches
- 6.2 utility-form.inc \imagecache_actions_validate_alpha()
- 6 utility.inc \imagecache_actions_validate_alpha()
- 7 utility-form.inc \imagecache_actions_validate_alpha()
Form element validator that checks a transparency percentage value.
Parameters
array $element:
File
- ./
utility-form.inc, line 62 - Utility form, conversion and rendering functions for image processes.
Code
function imagecache_actions_validate_alpha(&$element) {
if (!is_numeric($element['#value']) || $element['#value'] < 1 || $element['#value'] > 100) {
form_set_error(join('][', $element['#parents']), t('Opacity must be a number between 1 and 100.'));
}
}