function _adaptive_image_form_image_effect_form_validate in Adaptive Image 7
Form validation handler
1 string reference to '_adaptive_image_form_image_effect_form_validate'
- adaptive_image_form_image_effect_form_alter in ./
adaptive_image.module - Validate Input of Resolutions-Field
File
- ./
adaptive_image.module, line 156 - Adaptive Image - Adaptive images for Drupal
Code
function _adaptive_image_form_image_effect_form_validate($form, &$form_state) {
$resolutions = explode(',', $form['data']['resolutions']['#value']);
foreach ($resolutions as $width) {
$width = trim($width, ' ');
if (!is_numeric($width)) {
form_set_error('resolutions', t("Values have to be seperated by comma. For example: 1382, 992, 768, 480"));
}
}
}