From d5c05385442702c3ca0862db68bc4d0dbe84c6d2 Mon Sep 17 00:00:00 2001 From: baldo Date: Tue, 2 Aug 2022 15:25:34 +0200 Subject: [PATCH] Fixed copy paste issue with validation regexps. --- server/validation/constraints.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server/validation/constraints.ts b/server/validation/constraints.ts index e90cfe7..83604c6 100644 --- a/server/validation/constraints.ts +++ b/server/validation/constraints.ts @@ -36,12 +36,12 @@ const CONSTRAINTS = { }, mac: { type: 'string', - regex: /^([a-f0-9]{12}|([a-f0-9]{2}:){5}[a-f0-9]{2})$/i, + regex: /^([a-f0-9]{12}|([a-f0-9]{2}:){5}[a-f0-9]{2}|([a-f0-9]{2}-){5}[a-f0-9]{2})$/i, optional: false }, coords: { type: 'string', - regex: /^([a-f0-9]{12}|([a-f0-9]{2}:){5}[a-f0-9]{2}|([a-f0-9]{2}-){5}[a-f0-9]{2})$/i, + regex: /^(-?[0-9]{1,3}(\.[0-9]{1,15})? -?[0-9]{1,3}(\.[0-9]{1,15})?)$/, optional: true }, monitoring: {