function widgets_element_scale_validate in Widgets 7
Element validate handler to ensure that either a height or a width is specified.
File
- ./
widgets.admin.inc, line 746 - Administration pages for widget settings.
Code
function widgets_element_scale_validate($element, &$form_state) {
if (empty($element['width']['#value']) && empty($element['height']['#value'])) {
form_error($element, t('Width and height can not both be blank.'));
}
}