Allow dash as delimiter in MACs.

This commit is contained in:
baldo 2022-07-22 17:10:39 +02:00
parent 533710a2d4
commit ffc0f13eb8
4 changed files with 9 additions and 8 deletions
server/validation

View file

@ -40,7 +40,7 @@ const CONSTRAINTS = {
},
coords: {
type: 'string',
regex: /^(-?[0-9]{1,3}(\.[0-9]{1,15})? -?[0-9]{1,3}(\.[0-9]{1,15})?)$/,
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: true
},
monitoring: {