Commit dc86807c authored by Dries's avatar Dries

- Patch #99517 by webchick and chx: fixed bogus regex.

parent 4df25c20
...@@ -231,7 +231,7 @@ function node_type_form_validate($form_id, $form_values) { ...@@ -231,7 +231,7 @@ function node_type_form_validate($form_id, $form_values) {
if (isset($types[$type->type]) && $type->type != $old_type) { 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))); 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.')); form_set_error('type', t('The machine-readable name can only consist of lowercase letters, underscores, and numbers.'));
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment