diff --git a/packages/channels/botpress-channel-web/src/api.js b/packages/channels/botpress-channel-web/src/api.js
index <HASH>..<HASH> 100755
--- a/packages/channels/botpress-channel-web/src/api.js
+++ b/packages/channels/botpress-channel-web/src/api.js
@@ -16,6 +16,7 @@ import users from './users'
 const ERR_USER_ID_REQ = '`userId` is required and must be valid'
 const ERR_MSG_TYPE = '`type` is required and must be valid'
 const ERR_CONV_ID_REQ = '`conversationId` is required and must be valid'
+const VALID_USER_ID_RE = /^[a-z0-9-_]+$/i
 
 module.exports = async (bp, config) => {
   const diskStorage = multer.diskStorage({
@@ -209,9 +210,7 @@ module.exports = async (bp, config) => {
     })
   })
 
-  function validateUserId(userId) {
-    return /^[a-z0-9-_]+$/i.test(userId)
-  }
+  const validateUserId = userId => VALID_USER_ID_RE.test(userId)
 
   async function sendNewMessage(userId, conversationId, payload) {
     if (!payload.text || !_.isString(payload.text) || payload.text.length > 360) {
fix(channel-web): extract frequently used regex