From dc86807cfd162bb59b8cf4fe4da3bf8e4282f539 Mon Sep 17 00:00:00 2001 From: Dries Buytaert Date: Fri, 24 Nov 2006 16:32:30 +0000 Subject: - Patch #99517 by webchick and chx: fixed bogus regex. --- modules/node/content_types.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/node/content_types.inc b/modules/node/content_types.inc index 251a49066..389234617 100644 --- a/modules/node/content_types.inc +++ b/modules/node/content_types.inc @@ -231,7 +231,7 @@ function node_type_form_validate($form_id, $form_values) { if (isset($types[$type->type]) && $type->type != $old_type) { form_set_error('type', t('The machine-readable name %type is already taken.', array('%type' => $type->type))); } - if (!preg_match('!a-z0-9_!', $type->type)) { + if (!preg_match('!^[a-z0-9_]+$!', $type->type)) { form_set_error('type', t('The machine-readable name can only consist of lowercase letters, underscores, and numbers.')); } } -- cgit v1.2.3