You are here

function site_verify_validate_meta_google in Site verification 7.2

Same name and namespace in other branches
  1. 6 site_verify.admin.inc \site_verify_validate_meta_google()
  2. 7 site_verify.admin.inc \site_verify_validate_meta_google()

Validate that the 'meta' property uses the correct pattern for Google.

File

./site_verify.admin.inc, line 311

Code

function site_verify_validate_meta_google($element, &$form_state) {
  $value = strtolower(trim($element['#value']));
  if ($value != '' && !preg_match('%\\A<meta name="verify-v1" content="[\\S]+" />\\Z%', $value)) {
    form_error($element, t('Invalid verification meta tag.'));
  }
}