aboutsummaryrefslogtreecommitdiff
path: root/frontend/src/validation.js
diff options
context:
space:
mode:
Diffstat (limited to 'frontend/src/validation.js')
-rw-r--r--frontend/src/validation.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/frontend/src/validation.js b/frontend/src/validation.js
index eac8774..8f3409f 100644
--- a/frontend/src/validation.js
+++ b/frontend/src/validation.js
@@ -1,6 +1,6 @@
const validation = {
- isValidColor: (color) => true, // TODO
+ isValidColor: (color) => /^#(?:[0-9a-fA-F]{3}){1,2}$/.test(color),
isValidPort: (port, required) => parseInt(port) > (required ? 0 : -1) && parseInt(port) <= 65565,
isValidAddress: (address) => true // TODO
};