FEATURE: Show an error message if regex is invalid (PR #13164)

The server cannot always determine when a watched word regular expression is invalid and this commit implements the check on the client side.

GitHub

Any chances you can show which one(s) is generating an error?

I updated the pull request.

I think we should surround the regex with double quotes to ensure it’s easily identifiable

        invalid_regex: 'The watched word "%{word}" is an invalid regular expression.'

Why aren’t you using words.forEach or for (let word in words)?