Skip to content

Commit

Permalink
Correct validation regex
Browse files Browse the repository at this point in the history
  • Loading branch information
steeelydan committed Nov 3, 2023
1 parent 525a54d commit ca9708d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion mayacontrol.js
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ app.post('/setting', (req, res) => {
['mic', 'hiz', 'line', 'mic_hiz', 'mute'].includes(value) ||
Number.isInteger(value)
) ||
!/[a-zA-Z]/.test(setting)
!/^[a-zA-Z]+$/.test(setting)
) {
return res.status(400).send();
}
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "maya22-web-control",
"version": "1.3.3",
"version": "1.3.4",
"description": "Control ESI Maya 22",
"main": "mayacontrol.js",
"scripts": {
Expand Down

0 comments on commit ca9708d

Please # to comment.