Sfoglia il codice sorgente

Changed custom url validator

Oleh T 7 anni fa
parent
commit
371ced42fc
1 ha cambiato i file con 1 aggiunte e 1 eliminazioni
  1. 1 1
      server/controllers/validateBodyController.js

+ 1 - 1
server/controllers/validateBodyController.js

@@ -70,7 +70,7 @@ exports.validateUrl = async ({ body, user }, res, next) => {
   // Custom URL validations
   if (user && body.customurl) {
     // Validate custom URL
-    if (!/^[a-zA-Z1-9-_]+$/g.test(body.customurl.trim())) {
+    if (!/^[a-zA-Z0-9-_]+$/g.test(body.customurl.trim())) {
       return res.status(400).json({ error: 'Custom URL is not valid.' });
     }