Fixed copy paste issue with validation regexps.

This commit is contained in:
baldo 2022-08-02 15:25:34 +02:00
parent 8adde69da8
commit d5c0538544

View file

@ -36,12 +36,12 @@ const CONSTRAINTS = {
}, },
mac: { mac: {
type: 'string', 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 optional: false
}, },
coords: { coords: {
type: 'string', 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 optional: true
}, },
monitoring: { monitoring: {