Refactoring of ValidatedTextField-types

This commit is contained in:
Pieter Vander Vennet 2022-02-11 20:56:54 +01:00
parent 9ab4fbd6f5
commit e07b770e8c
2 changed files with 382 additions and 300 deletions

View file

@ -100,7 +100,6 @@ export default class TagRenderingConfig {
const typeDescription = Translations.t.validation[type]?.description
placeholder = Translations.T(json.freeform.key+" ("+type+")")
if(typeDescription !== undefined){
console.log(typeDescription)
placeholder = placeholder.Fuse(typeDescription, type)
}
}
@ -135,7 +134,7 @@ export default class TagRenderingConfig {
if (!ValidatedTextField.AllTypes.has(this.freeform.type)) {
const knownKeys = ValidatedTextField.tpList.map(tp => tp.name).join(", ");
const knownKeys = ValidatedTextField.AvailableTypes().join(", ");
throw `Freeform.key ${this.freeform.key} is an invalid type. Known keys are ${knownKeys}`
}
if (this.freeform.addExtraTags) {