You are here

function focal_point_element_form_validate in Focal Point 7

Validation function for the focal point widget.

1 string reference to 'focal_point_element_form_validate'
_focal_point_field in ./focal_point.module
Define the focal point text field.

File

./focal_point.module, line 268

Code

function focal_point_element_form_validate($element, &$form_state, $form) {
  $focal_point = isset($element['#value']) ? $element['#value'] : '';
  if (!focal_point_validate($focal_point)) {
    form_error($element, t('Focal points should be in the format ##,## without spaces where the numbers are between 1 and 100.'));
  }
}