diff --git a/src/UI/InputElement/Validators.ts b/src/UI/InputElement/Validators.ts index d07061bdd..ca01c80aa 100644 --- a/src/UI/InputElement/Validators.ts +++ b/src/UI/InputElement/Validators.ts @@ -33,36 +33,35 @@ export type ValidatorType = (typeof Validators.availableTypes)[number] export default class Validators { public static readonly availableTypes = [ - "string", - "text", - "date", - "nat", - "int", - "distance", - "direction", - "wikidata", - "pnat", - "float", - "pfloat", - "email", - "url", - "phone", - "opening_hours", "color", - "image", - "simple_tag", - "key", - "translation", - "icon", - "fediverse", - "tag", - "fediverse", - "id", - "slope", - "velopark", - "nsi", "currency", + "date", + "direction", + "distance", + "email", + "fediverse", + "float", + "icon", + "id", + "image", + "int", + "key", + "nat", + "nsi", + "opening_hours", + "pfloat", + "phone", + "pnat", "regex", + "simple_tag", + "slope", + "string", + "tag", + "text", + "translation", + "url", + "velopark", + "wikidata" ] as const public static readonly AllValidators: ReadonlyArray = [ @@ -94,7 +93,7 @@ export default class Validators { new VeloparkValidator(), new NameSuggestionIndexValidator(), new CurrencyValidator(), - new RegexValidator(), + new RegexValidator() ] private static _byType = Validators._byTypeConstructor() diff --git a/src/UI/Popup/UnitInput.svelte b/src/UI/Popup/UnitInput.svelte index f299f75fa..e78faa005 100644 --- a/src/UI/Popup/UnitInput.svelte +++ b/src/UI/Popup/UnitInput.svelte @@ -23,11 +23,11 @@ export let getCountry = () => "?" onMount(() => { - console.log("Setting selected unit based on country", getCountry(), upstreamValue.data) + console.log("Setting selected unit based on country", getCountry(), "and upstream value:", upstreamValue.data) if (upstreamValue.data === undefined || upstreamValue.data === "") { // Init the selected unit let denomination: Denomination = unit.getDefaultDenomination(getCountry) - console.log("Found denom", denomination.canonical) + console.log("Found denom", denomination.canonical, "available denominations are:", unit.denominations.map(denom => denom.canonical)) selectedUnit.setData(denomination.canonical) } })