diff --git a/Models/ThemeConfig/TagRenderingConfig.ts b/Models/ThemeConfig/TagRenderingConfig.ts index e680143578..c790be1808 100644 --- a/Models/ThemeConfig/TagRenderingConfig.ts +++ b/Models/ThemeConfig/TagRenderingConfig.ts @@ -109,7 +109,11 @@ export default class TagRenderingConfig { if (json.freeform.addExtraTags !== undefined && json.freeform.addExtraTags.map === undefined) { throw `Freeform.addExtraTags should be a list of strings - not a single string (at ${context})` } - const type = json.freeform.type ?? "string" + const type = json.freeform.type ?? "string" + + if(ValidatedTextField.AvailableTypes().indexOf(type ) < 0){ + throw "At "+context+".freeform.type is an unknown type: "+type+"; try one of "+ValidatedTextField.AvailableTypes().join(", ") + } let placeholder: Translation = Translations.T(json.freeform.placeholder) if (placeholder === undefined) { diff --git a/UI/Input/ValidatedTextField.ts b/UI/Input/ValidatedTextField.ts index 9976ca3887..1acad39716 100644 --- a/UI/Input/ValidatedTextField.ts +++ b/UI/Input/ValidatedTextField.ts @@ -546,7 +546,7 @@ class LengthTextField extends TextFieldDef { constructor() { super( - "decimal", "A geographical length in meters (rounded at two points). Will give an extra minimap with a measurement tool. Arguments: [ zoomlevel, preferredBackgroundMapType (comma separated) ], e.g. `[\"21\", \"map,photo\"]" + "length", "A geographical length in meters (rounded at two points). Will give an extra minimap with a measurement tool. Arguments: [ zoomlevel, preferredBackgroundMapType (comma separated) ], e.g. `[\"21\", \"map,photo\"]" ) }