Explorar el Código

Changed custom url validator

Oleh T hace 7 años
padre
commit
371ced42fc
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  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.' });
     }