This commit is contained in:
Koen Kanters
2021-01-09 15:13:29 +01:00
parent 9189dd1d3d
commit 7b0eb87685
+1 -1
View File
@@ -197,7 +197,7 @@ function validateFriendlyName(name) {
}
if (name.length === 0) errors.push(`friendly_name shoud atleast be 1 char long`);
if (name.endsWith('/')) errors.push(`friendly_name is not allowed to end with /`);
if (name.endsWith('/') || name.startsWith('/')) errors.push(`friendly_name is not allowed to end or start with /`);
if (name.endsWith(String.fromCharCode(0))) errors.push(`friendly_name is not allowed to contain null char`);
if (endpointNames.includes(name)) errors.push(`Following friendly_name are not allowed: '${endpointNames}'`);
if (name.match(/.*\/\d*$/)) errors.push(`Friendly name cannot end with a "/DIGIT" ('${name}')`);