You are here

function _linkicon_element_validate_font_path in Link Icon 7

Validate path to icon font CSS file.

1 string reference to '_linkicon_element_validate_font_path'
_linkicon_field_formatter_settings_form in includes/linkicon.admin.inc
Implements hook_field_formatter_settings_form().

File

./linkicon.module, line 299
A link field formatter to create icon classes based on predefined titles.

Code

function _linkicon_element_validate_font_path($element, &$form_state, $form) {
  if (!empty($element['#value']) && !is_file($element['#value'])) {
    form_set_error($element['#name'], t("<strong>@css_font_path</strong> doesn't exist.", array(
      '@css_font_path' => $element['#value'],
    )));
  }
}