Javascript now works with multiple classes on elements.
[fa-stable.git] / inventory / manage / locations.php
index 0bae7585fc6469b1bc1813f5fee64fa9c95338a5..21b3f64176a80cca58f0f75dc8a54559df57aa02 100644 (file)
@@ -33,7 +33,7 @@ if ($Mode=='ADD_ITEM' || $Mode=='UPDATE_ITEM')
        //first off validate inputs sensible
        $_POST['loc_code'] = strtoupper($_POST['loc_code']);
 
-       if (strlen(db_escape($_POST['loc_code'])) > 7) //check length after conversion
+       if ((strlen(db_escape($_POST['loc_code'])) > 7) || empty($_POST['loc_code'])) //check length after conversion
        {
                $input_error = 1;
                display_error( _("The location code must be five characters or less long (including converted special chars)."));