refactoring: more fixes, first attempt at tagRenderingAnswer

This commit is contained in:
Pieter Vander Vennet 2023-03-30 04:51:56 +02:00
parent aaaaf1948d
commit 29372c465e
24 changed files with 278 additions and 113 deletions

View file

@ -17,10 +17,17 @@ export abstract class Validator {
* What HTML-inputmode to use
*/
public readonly inputmode?: string
public readonly textArea: boolean
constructor(name: string, explanation: string | BaseUIElement, inputmode?: string) {
constructor(
name: string,
explanation: string | BaseUIElement,
inputmode?: string,
textArea?: false | boolean
) {
this.name = name
this.inputmode = inputmode
this.textArea = textArea ?? false
if (this.name.endsWith("textfield")) {
this.name = this.name.substr(0, this.name.length - "TextField".length)
}
@ -46,7 +53,7 @@ export abstract class Validator {
}
}
public isValid(string: string, requestCountry: () => string): boolean {
public isValid(string: string, requestCountry?: () => string): boolean {
return true
}