You are here

function outdatedbrowser_element_validate_colour in Outdated Browser 7

Element validation callback: validate hexadecimal colour code.

1 string reference to 'outdatedbrowser_element_validate_colour'
outdatedbrowser_admin in ./outdatedbrowser.admin.inc
Outdated Browser module configuration form.

File

./outdatedbrowser.admin.inc, line 56
Outdated Browser module administration page.

Code

function outdatedbrowser_element_validate_colour($element, &$form_state, $form) {
  if (!outdatedbrowser_valid_hexadecimal_string($element['#value'])) {
    form_error($element, t('The given value is not a valid hexadecimal colour code.'));
  }
}