Commit c19c4236 authored by Leigh Stoller's avatar Leigh Stoller

Allow + in image names.

parent 888fd409
......@@ -422,9 +422,9 @@ if (!isset($formfields[imagename]) ||
$errors["Descriptor Name"] = "Missing Field";
}
else {
if (! ereg("^[a-zA-Z0-9][-_a-zA-Z0-9\.]+$", $formfields[imagename])) {
if (! ereg("^[a-zA-Z0-9][-_a-zA-Z0-9\.\+]+$", $formfields[imagename])) {
$errors["Descriptor Name"] =
"Must be alphanumeric (includes _ and - and .)<br>".
"Must be alphanumeric (includes _, -, +, and .)<br>".
"and must begin with an alphanumeric";
}
elseif (strlen($formfields[imagename]) > $TBDB_IMAGEID_IMAGENAMELEN) {
......
......@@ -443,9 +443,9 @@ if (!isset($formfields[imagename]) ||
$errors["Descriptor Name"] = "Missing Field";
}
else {
if (! ereg("^[a-zA-Z0-9][-_a-zA-Z0-9\.]+$", $formfields[imagename])) {
if (! ereg("^[a-zA-Z0-9][-_a-zA-Z0-9\.\+]+$", $formfields[imagename])) {
$errors["Descriptor Name"] =
"Must be alphanumeric (includes _ and - and .)<br>".
"Must be alphanumeric (includes _, -, +, and .)<br>".
"and must begin with an alphanumeric";
}
elseif (strlen($formfields[imagename]) > $TBDB_IMAGEID_IMAGENAMELEN) {
......
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