summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
Diffstat (limited to 'modules')
-rw-r--r--modules/node/content_types.inc2
1 files changed, 1 insertions, 1 deletions
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.'));
}
}